Config.Config: use_enum_values = False

Save enum fields as the enum object rather than the value.
This commit is contained in:
Masen Furer 2025-02-11 16:42:01 -08:00
parent db7c392390
commit 37023c0d44
No known key found for this signature in database
GPG Key ID: B0008AD22B3B3A95

View File

@ -628,6 +628,7 @@ class Config(Base):
"""Pydantic config for the config."""
validate_assignment = True
use_enum_values = False
# The name of the app (should match the name of the app directory).
app_name: str
@ -758,6 +759,9 @@ class Config(Base):
self._non_default_attributes.update(kwargs)
self._replace_defaults(**kwargs)
# Set the log level for this process
console.set_log_level(self.loglevel)
if (
self.state_manager_mode == constants.StateManagerMode.REDIS
and not self.redis_url