From 25bf04fe5aee34891644f9710082cf02c2f18f04 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Wed, 31 Aug 2022 22:23:11 +0300 Subject: [PATCH] added reset poll function --- src/fmn_database.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fmn_database.py b/src/fmn_database.py index 384f256..0ef6768 100644 --- a/src/fmn_database.py +++ b/src/fmn_database.py @@ -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 (?, ?, ?, ?, ?)", (winned_movies)) conn.commit() + +def reset_poll(): + '''Сброс содержимого предложки-опроса''' + c.execute("DELETE FROM poll") + conn.commit() +