Docker tweaking & bug fixes

This commit is contained in:
2020-01-25 10:13:50 -05:00
parent 2b2ef5eac7
commit ae0fb9b1a6
5 changed files with 28 additions and 6 deletions

View File

@@ -121,7 +121,9 @@ class Database:
cursor = conn.cursor()
cursor.execute("SELECT id FROM Website ORDER BY random() LIMIT 1")
return cursor.fetchone()[0]
if cursor.fetchone():
return cursor.fetchone()[0]
return None
def website_exists(self, url):
"""Check if an url or the parent directory of an url already exists"""