From 8c895eddeac589a9d7dfe93a926e006b52d4397c Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Fri, 17 Nov 2023 13:06:38 +1100 Subject: [PATCH] fix: Update no domain data to use False instead of empty string --- sites/db.py | 2 +- sites/website.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sites/db.py b/sites/db.py index 730158e..5d84f9b 100644 --- a/sites/db.py +++ b/sites/db.py @@ -24,7 +24,7 @@ def get_website_data(domain): connection.close() if data == []: - return "" + return False parsed = data[0][2] parsed = json.loads(parsed) diff --git a/sites/website.py b/sites/website.py index da38f34..7e3ade5 100644 --- a/sites/website.py +++ b/sites/website.py @@ -8,7 +8,7 @@ if os.getenv('MAIN_DOMAIN') != None: main_domain = os.getenv('MAIN_DOMAIN') def render(data,db_object): - if data == "": + if data == False: return redirect("https://" + main_domain + '/claim?domain=' + request.host.split('.')[0]) # Render as HTML