Return non found if the locator does not fit the proper format

This commit is contained in:
Sergi Delgado Segura
2019-12-04 13:27:06 +01:00
parent d2b7216a96
commit c663fab788

View File

@@ -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)