mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 22:24:23 +01:00
Return non found if the locator does not fit the proper format
This commit is contained in:
@@ -77,6 +77,9 @@ def get_appointment():
|
|||||||
response = []
|
response = []
|
||||||
|
|
||||||
# ToDo: #15-add-system-monitor
|
# ToDo: #15-add-system-monitor
|
||||||
|
if not isinstance(locator, str) or len(locator) != 64:
|
||||||
|
response.append({"locator": locator, "status": "not_found"})
|
||||||
|
return jsonify(response)
|
||||||
|
|
||||||
locator_map = watcher.db_manager.load_locator_map(locator)
|
locator_map = watcher.db_manager.load_locator_map(locator)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user