diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/main.py | 4 |
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", |