mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 14:14:22 +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 = []
|
||||
|
||||
# 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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user