From fcad77a8395ef2e89bff4e2c826381eb4f4bbea7 Mon Sep 17 00:00:00 2001 From: Iain Learmonth Date: Fri, 22 Apr 2022 14:32:31 +0100 Subject: [PATCH] models/alarm: fix csv row --- app/models/alarms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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):