Skip to content

Commit

Permalink
Fix pydantic alias issue
Browse files Browse the repository at this point in the history
This PR removes the alias as pydantic requires the usage of the alias when initializing the class not the original name which prevents this code from working.

```py
cosmosdb_settings = AzureCosmosDBSettings.create(
                env_file_path=env_file_path,
                connection_string=cosmos_connstr,
            )
```
  • Loading branch information
john0isaac authored Dec 22, 2024
1 parent 926a590 commit 32eaa24
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ class AzureCosmosDBSettings(KernelBaseSettings):
env_prefix: ClassVar[str] = "COSMOSDB_"

api: str | None = None
connection_string: SecretStr | None = Field(None, alias="AZCOSMOS_CONNSTR")
connection_string: SecretStr | None = None

0 comments on commit 32eaa24

Please sign in to comment.