This commit is contained in:
xieshen 2020-10-21 15:49:19 +08:00
parent 2893c1de4a
commit a61b5e43f8
1 changed files with 2 additions and 1 deletions

View File

@ -49,15 +49,16 @@ def alarm(request):
cursor1.execute("select * from alarms where name = '%s' order by created_at desc " % (n))
row1 = cursor1.fetchall()
alarms = []
alarms.append(n)
for r1 in row1:
print(r1)
o = dict()
o['id'] = r1[0]
o['name'] = r1[1]
o['type'] = r1[2]
o['status'] = r1[5]
o['duration'] = r1[6]
o['created_at'] = r1[7]
alarms.append(o)
print("===================================================================")
res.append(alarms)