From 4bbbb01275e9dcd5a3d336975a4662db31dd4c21 Mon Sep 17 00:00:00 2001 From: "Menghua Chen (WICRESOFT NORTH AMERICA LTD)" Date: Wed, 19 Jun 2024 15:36:13 +0800 Subject: [PATCH] modify models.py --- templates/todo/api/python/todo/models.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/todo/api/python/todo/models.py b/templates/todo/api/python/todo/models.py index e6933bafb15..eddbad71fd7 100644 --- a/templates/todo/api/python/todo/models.py +++ b/templates/todo/api/python/todo/models.py @@ -20,7 +20,6 @@ def __init__(self, *args, **kwargs): credential = DefaultAzureCredential() keyvault_client = SecretClient(self.AZURE_KEY_VAULT_ENDPOINT, credential) for secret in keyvault_client.list_properties_of_secrets(): - if secret.name == "AZURE-COSMOS-CONNECTION-STRING": setattr( self, keyvault_name_as_attr(secret.name), @@ -32,6 +31,13 @@ def __init__(self, *args, **kwargs): AZURE_KEY_VAULT_ENDPOINT: Optional[str] = None APPLICATIONINSIGHTS_CONNECTION_STRING: Optional[str] = None APPLICATIONINSIGHTS_ROLENAME: Optional[str] = "API" + PRIMARY_WRITE_KEY: str = "" + PRIMARY_READONLY_KEY: str = "" + SECONDARY_WRITE_CONNECTIONSTRING: str = "" + PRIMARY_READONLY_CONNECTIONSTRING: str = "" + SECONDARY_WRITE_KEY: str = "" + SECONDARY_READONLY_KEY: str = "" + SECONDARY_READONLY_CONNECTIONSTRING: str = "" class Config: env_file = ".env"