Skip to content

Commit

Permalink
Merge pull request #43 from AppElent/develop
Browse files Browse the repository at this point in the history
change cosmos client key
  • Loading branch information
AppElent authored Feb 17, 2023
2 parents 252fdd1 + 00d21fa commit 0266fde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions django/api/api/modules/AzureCosmosDb.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def load(self):
if self._database_client is None:
try:
environment = str(os.getenv("ENVIRONMENT") or "LOCAL").lower()
access_key = os.getenv('COSMOS_ACCESS_KEY') or ''
access_key = os.getenv('cosmos-access-key') or ''
container_name = "providers_" + environment
query = "select * from " + container_name + " p"
print(environment, query)
Expand All @@ -30,7 +30,7 @@ def load(self):
providers.append(item)
print('--- Cosmos DB Adapter loaded successfully. ---')
except Exception as e:
print('!!!!! Data from Cosmos DB could not be retrieved. Is Environment Variable COSMOS_ACCESS_KEY set?')
print('!!!!! Data from Cosmos DB could not be retrieved. Is Environment Variable cosmos-access-key set?')
print(e)

def get_database_client(self):
Expand Down
4 changes: 2 additions & 2 deletions django/api/oauth/modules/AzureCosmosDb.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def load(self):
# Get providers from azure cosmos db
try:
environment = str(os.getenv("ENVIRONMENT") or "LOCAL").lower()
access_key = os.getenv('COSMOS_ACCESS_KEY') or ''
access_key = os.getenv('cosmos-access-key') or ''
container_name = "providers_" + environment
query = "select * from " + container_name + " p"
print(environment, query)
Expand All @@ -29,7 +29,7 @@ def load(self):
providers.append(item)
print('--- Cosmos DB Adapter loaded successfully. ---')
except Exception as e:
print('!!!!! Data from Cosmos DB could not be retrieved. Is Environment Variable COSMOS_ACCESS_KEY set?')
print('!!!!! Data from Cosmos DB could not be retrieved. Is Environment Variable cosmos-access-key set?')
print(e)

def get_database_client(self):
Expand Down

0 comments on commit 0266fde

Please sign in to comment.