diff --git a/app/models/alarms.py b/app/models/alarms.py index bd84387..4ff33c9 100644 --- a/app/models/alarms.py +++ b/app/models/alarms.py @@ -38,7 +38,7 @@ class Alarm(db.Model): def csv_row(self): return [ - self[x] for x in self.csv_header() + getattr(self, x) for x in self.csv_header() ] def update_state(self, state: AlarmState, text: str):