summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorErnst Widerberg <ernst@sunet.se>2022-01-14 16:37:20 +0100
committerErnst Widerberg <ernst@sunet.se>2022-01-14 16:37:20 +0100
commitf5001fc965eae9748e089f36a6017674ca3be839 (patch)
tree15e0bce218099eaebc5b4a26fe25a5e7ca69a45b /src
parent09355bbb7041023efb445d57277634e5061b9cec (diff)
Bugfix
Diffstat (limited to 'src')
-rwxr-xr-xsrc/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.py b/src/main.py
index 1340ba6..fb359df 100755
--- a/src/main.py
+++ b/src/main.py
@@ -152,7 +152,7 @@ async def get_key(key=None, Authorize: AuthJWT = Depends()):
data = get_data(key)
- if data["domain"] not in allowed_domains:
+ if data and data["domain"] not in allowed_domains:
return JSONResponse(
content={
"status": "error",
@@ -198,7 +198,7 @@ async def delete(key, Authorize: AuthJWT = Depends()):
data = get_data(key)
- if data["domain"] not in allowed_domains:
+ if data and data["domain"] not in allowed_domains:
return JSONResponse(
content={
"status": "error",