canonicalize ids here and there

This commit is contained in:
boyska 2022-01-17 01:07:32 +01:00
parent 49638cab7c
commit 867812fba7
2 changed files with 4 additions and 2 deletions

View file

@ -115,7 +115,9 @@ class EventModel(object):
def get_all_alarms(self) -> list:
out = []
for db in self._dbs:
out.extend(self._dbs[db].table('alarms').all())
for alarm in self._dbs[db].table('alarms').all():
alarm.doc_id = '%s:%s' % (db, alarm.doc_id)
out.append(alarm)
return out
def get_all_actions(self) -> list:

View file

@ -124,7 +124,7 @@ def edit_time(alarmid):
model.update_alarm(alarmid, data)
model.reload()
return redirect(
url_for("db.events_calendar", highlight="%d" % alarmid)
url_for("db.events_calendar", highlight=model.canonicalize(alarmid))
)
return render_template(
"add_time_kind.html",