Fixed backend not supporting editing multi color dir

This commit is contained in:
Donkie
2024-05-28 20:20:44 +02:00
parent c7d58a2938
commit cc7dceb2a3
2 changed files with 45 additions and 0 deletions

View File

@@ -168,6 +168,8 @@ async def update(
filament.vendor = await vendor.get_by_id(db, v)
elif k == "extra":
filament.extra = [models.FilamentField(key=k, value=v) for k, v in v.items()]
elif k == "multi_color_direction":
filament.multi_color_direction = v.value if v is not None else None
else:
setattr(filament, k, v)
await db.commit()