From be1c1c7db75487f98d73c933e625fd6080663eed Mon Sep 17 00:00:00 2001 From: jeancf Date: Thu, 15 Jun 2023 17:58:38 +0200 Subject: [PATCH] Initialize url in db as None --- twoot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twoot.py b/twoot.py index 6593a7d..8dfab80 100755 --- a/twoot.py +++ b/twoot.py @@ -222,7 +222,7 @@ def update_profile(nitter_url, soup, sql, mast_password): logging.info('banner image changed on twitter profile') else: # Mastodon user not found in database. Add new record - db.execute("INSERT INTO profiles (mastodon_instance, mastodon_account, avatar_url, banner_url) VALUES (?, ?, ?, ?)", (TOML['config']['mastodon_instance'], TOML['config']['mastodon_user'], "", "")) + db.execute("INSERT INTO profiles (mastodon_instance, mastodon_account, avatar_url, banner_url) VALUES (?, ?, ?, ?)", (TOML['config']['mastodon_instance'], TOML['config']['mastodon_user'], None, None)) sql.commit() changed = True logging.debug("added new profile to database")