Check monitor id is given in update_monitor()

See the bug report.

Closes-Bug: #2055157
Change-Id: Icc2ea6e6563f26dcd9627e4839aed528fbd5ff32
This commit is contained in:
Tobias Urdin 2024-02-27 14:17:57 +01:00
parent 58fb718540
commit 99116850dc
1 changed files with 5 additions and 1 deletions

View File

@ -591,7 +591,11 @@ def update_monitor(request, **kwargs):
"""
data = request.DATA
monitor_id = data['monitor']['id']
monitor_id = data['monitor'].get('id', None)
if monitor_id is None:
return
hm_type = data['monitor']['type']
conn = get_sdk_connection(request)