Initialize url in db as None

This commit is contained in:
jeancf 2023-06-15 17:58:38 +02:00
parent b883862b36
commit be1c1c7db7

View File

@ -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")