mai2: added upsert returns, fixed event reader, thanks @One3

Thanks to @One3 for helping with the events
This commit is contained in:
2023-04-11 17:57:21 +02:00
parent f63dd07937
commit 28c06335b6
4 changed files with 77 additions and 12 deletions

View File

@ -113,7 +113,7 @@ class Mai2StaticData(BaseData):
self, version: int, event_id: int, toggle: bool
) -> Optional[List]:
sql = event.update(
and_(event.c.version == version, event.c.event_id == event_id)
and_(event.c.version == version, event.c.eventId == event_id)
).values(enabled=int(toggle))
result = self.execute(sql)