mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 17:25:22 +03:00
Enforce 20 character limit in http
This commit is contained in:
parent
52c9e69d3c
commit
f4f5fac6c7
@ -168,6 +168,12 @@ def set_sub_label(id):
|
|||||||
new_sub_label = None
|
new_sub_label = None
|
||||||
|
|
||||||
|
|
||||||
|
if new_sub_label and len(new_sub_label) > 20:
|
||||||
|
return make_response(
|
||||||
|
jsonify({"success": False, "message": new_sub_label + " exceeds the 20 character limit for sub_label"}), 400
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
event.sub_label = new_sub_label
|
event.sub_label = new_sub_label
|
||||||
event.save()
|
event.save()
|
||||||
return make_response(
|
return make_response(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user