added reset poll function

This commit is contained in:
localhost_frssoft 2022-08-31 22:23:11 +03:00
parent 9708d36e5d
commit 25bf04fe5a

View File

@ -85,3 +85,9 @@ def rewrite_db(winned_movies=list):
c.executemany("INSERT OR IGNORE INTO poll(user_suggested, original_name, ru_name, year, votes) VALUES (?, ?, ?, ?, ?)", c.executemany("INSERT OR IGNORE INTO poll(user_suggested, original_name, ru_name, year, votes) VALUES (?, ?, ?, ?, ?)",
(winned_movies)) (winned_movies))
conn.commit() conn.commit()
def reset_poll():
'''Сброс содержимого предложки-опроса'''
c.execute("DELETE FROM poll")
conn.commit()