mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-25 14:34:19 +00:00
Fixed minor oversight
This commit is contained in:
parent
8b2080b8cd
commit
257ee130fb
1 changed files with 7 additions and 0 deletions
|
@ -129,6 +129,13 @@ def page_alert(aid):
|
||||||
alert.limit = request.json['limit']
|
alert.limit = request.json['limit']
|
||||||
if 'window_size' in request.json:
|
if 'window_size' in request.json:
|
||||||
alert.window_size = request.json['window_size']
|
alert.window_size = request.json['window_size']
|
||||||
|
if 'evaluation_mode' in request.json:
|
||||||
|
try:
|
||||||
|
alert.evaluation_mode = ConditionMode(request.json['evaluation_mode'])
|
||||||
|
except KeyError:
|
||||||
|
return json_error("Unknown `type` specified.", GENERIC_ENUM_INVALID), 400
|
||||||
|
except Exception as e:
|
||||||
|
return json_error("Unknown error:" + str(e), GENERIC_UFO), 400
|
||||||
ext.session.commit()
|
ext.session.commit()
|
||||||
return json_success(alert.to_json()), 204
|
return json_success(alert.to_json()), 204
|
||||||
elif request.method == "DELETE":
|
elif request.method == "DELETE":
|
||||||
|
|
Loading…
Reference in a new issue