From f5001fc965eae9748e089f36a6017674ca3be839 Mon Sep 17 00:00:00 2001 From: Ernst Widerberg Date: Fri, 14 Jan 2022 16:37:20 +0100 Subject: Bugfix --- src/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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", -- cgit v1.1