More robust image analyse
This commit is contained in:
parent
8c66ca83c8
commit
6c4db0e204
1 changed files with 8 additions and 2 deletions
|
|
@ -75,7 +75,10 @@ class ListPage(BasePage):
|
|||
lastvalue = GaugeMeasure()
|
||||
lastvalue.level = level
|
||||
lastvalue.date = lastdate
|
||||
lastvalue.alarm = self.alarmlevel[img]
|
||||
try:
|
||||
lastvalue.alarm = self.alarmlevel[img]
|
||||
except KeyError:
|
||||
lastvalue.alarm = ""
|
||||
levelsensor.lastvalue = lastvalue
|
||||
levelsensor.history = NotLoaded
|
||||
levelsensor.gaugeid = gauge.id
|
||||
|
|
@ -92,7 +95,10 @@ class ListPage(BasePage):
|
|||
lastvalue = GaugeMeasure()
|
||||
lastvalue.level = flow
|
||||
lastvalue.date = lastdate
|
||||
lastvalue.alarm = self.alarmlevel[img]
|
||||
try:
|
||||
lastvalue.alarm = self.alarmlevel[img]
|
||||
except KeyError:
|
||||
lastvalue.alarm = ""
|
||||
flowsensor.lastvalue = lastvalue
|
||||
flowsensor.history = NotLoaded
|
||||
flowsensor.gaugeid = gauge.id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue