Config.Config: use_enum_values = False
Save enum fields as the enum object rather than the value.
This commit is contained in:
parent
db7c392390
commit
37023c0d44
@ -628,6 +628,7 @@ class Config(Base):
|
|||||||
"""Pydantic config for the config."""
|
"""Pydantic config for the config."""
|
||||||
|
|
||||||
validate_assignment = True
|
validate_assignment = True
|
||||||
|
use_enum_values = False
|
||||||
|
|
||||||
# The name of the app (should match the name of the app directory).
|
# The name of the app (should match the name of the app directory).
|
||||||
app_name: str
|
app_name: str
|
||||||
@ -758,6 +759,9 @@ class Config(Base):
|
|||||||
self._non_default_attributes.update(kwargs)
|
self._non_default_attributes.update(kwargs)
|
||||||
self._replace_defaults(**kwargs)
|
self._replace_defaults(**kwargs)
|
||||||
|
|
||||||
|
# Set the log level for this process
|
||||||
|
console.set_log_level(self.loglevel)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
self.state_manager_mode == constants.StateManagerMode.REDIS
|
self.state_manager_mode == constants.StateManagerMode.REDIS
|
||||||
and not self.redis_url
|
and not self.redis_url
|
||||||
|
Loading…
Reference in New Issue
Block a user