mirror of
https://github.com/simon987/od-database.git
synced 2025-12-14 23:29:04 +00:00
Docker tweaking & bug fixes
This commit is contained in:
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user