mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-29 19:35:20 +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
|
|
@ -29,7 +29,11 @@ class AutomationTrigger(BaseModel, TimestampMixin):
|
|||
)
|
||||
|
||||
type = Column(
|
||||
SQLAlchemyEnum(TriggerType, name="automation_trigger_type"),
|
||||
SQLAlchemyEnum(
|
||||
TriggerType,
|
||||
name="automation_trigger_type",
|
||||
values_callable=lambda x: [e.value for e in x],
|
||||
),
|
||||
nullable=False,
|
||||
index=True,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue