cosmetic fix
This commit is contained in:
parent
e2f11a52e2
commit
d4d050372e
10
papi/main.py
10
papi/main.py
|
@ -65,7 +65,6 @@ class Notifier:
|
|||
"status": ["Le monitoring est inacessible"],
|
||||
}
|
||||
)
|
||||
breakpoint()
|
||||
|
||||
|
||||
Notifier = Notifier()
|
||||
|
@ -108,11 +107,11 @@ def list_notification(idsonde: str):
|
|||
|
||||
@app.get("/notifications/{idsonde}/text")
|
||||
def list_notification_as_text(request: Request, idsonde: str):
|
||||
notifs = notifications[idsonde]
|
||||
notifs = notifications[idsonde]
|
||||
try:
|
||||
content =notifs[-1]
|
||||
content = notifs[-1]
|
||||
except IndexError:
|
||||
return
|
||||
return
|
||||
try:
|
||||
recipients = sondeid2notifsemails(idsonde)
|
||||
except KeyError:
|
||||
|
@ -232,9 +231,10 @@ def list_notification_as_text(
|
|||
if message.endswith(k):
|
||||
return "color: %s;" % v
|
||||
return ""
|
||||
|
||||
if not (sonde := crud.get_sonde(db, idsonde)):
|
||||
return
|
||||
mesures = [x for x in crud.get_mesure(db, sonde.sonde_id, only_last=100)]
|
||||
mesures = [x for x in crud.get_mesure(db, sonde.sonde_id, only_last=100)]
|
||||
|
||||
res = []
|
||||
|
||||
|
|
Loading…
Reference in New Issue