HTTPAssetRepo: Don't throw when trying to serve invalid UUID

This commit is contained in:
Salad Dais
2021-06-11 17:51:45 +00:00
parent a21c0439e9
commit 52679bf708

View File

@@ -48,7 +48,11 @@ class HTTPAssetRepo(collections.UserDict):
asset_id = None
for name, val in flow.request.query.items():
if name.endswith("_id"):
asset_id = UUID(val)
try:
asset_id = UUID(val)
break
except ValueError:
pass
if not asset_id or asset_id not in self.data:
return False