insert empty row at account creation

This commit is contained in:
b3yond 2018-10-07 22:16:00 +02:00
parent f59be986e2
commit 0449d892a3

10
db.py
View file

@ -257,12 +257,10 @@ u\d\d?"""
(uid, json['email'])) (uid, json['email']))
self.execute("""INSERT INTO telegram_accounts (user_id, apikey, self.execute("""INSERT INTO telegram_accounts (user_id, apikey,
active) VALUES(?, ?, ?);""", (uid, "", 1)) active) VALUES(?, ?, ?);""", (uid, "", 1))
self.execute( self.execute("INSERT INTO seen_telegrams (user_id, tg_id) VALUES (?, ?);", (uid, 0))
"INSERT INTO seen_telegrams (user_id, tg_id) VALUES (?, ?);", (uid, 0)) self.execute("INSERT INTO seen_mail (user_id, mail_date) VALUES (?, ?);", (uid, 0))
self.execute( self.execute("INSERT INTO seen_tweets (user_id, tweet_id) VALUES (?, ?)", (uid, 0))
"INSERT INTO seen_mail (user_id, mail_date) VALUES (?, ?);", (uid, 0)) self.execute("INSERT INTO twitter_last_request (user_id, date) VALUES (?, ?)", (uid, 0))
self.execute("INSERT INTO seen_tweets (user_id, tweet_id) VALUES (?, ?)",
(uid, 0))
self.commit() self.commit()
user = User(uid) user = User(uid)
user.set_city(city) user.set_city(city)