mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-31 19:45:15 +02:00
fix(automations): use enum values not names for postgres enum columns
This commit is contained in:
parent
27ab367a13
commit
8fb65d7188
3 changed files with 15 additions and 3 deletions
|
|
@ -35,7 +35,11 @@ class AutomationRun(BaseModel, TimestampMixin):
|
|||
)
|
||||
|
||||
status = Column(
|
||||
SQLAlchemyEnum(RunStatus, name="automation_run_status"),
|
||||
SQLAlchemyEnum(
|
||||
RunStatus,
|
||||
name="automation_run_status",
|
||||
values_callable=lambda x: [e.value for e in x],
|
||||
),
|
||||
nullable=False,
|
||||
default=RunStatus.PENDING,
|
||||
server_default=RunStatus.PENDING.value,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue