remove unused start_milestone function

This commit is contained in:
Lili (Tlapka) 2023-06-26 13:12:28 +02:00
parent 6f6fc10d0f
commit f66b125ac3
1 changed files with 0 additions and 18 deletions

View File

@ -49,24 +49,6 @@ def add_to_redeem_queue(db, user_id, redeem_name, note=None):
return False
def start_milestone(db, redeem_name):
try:
cursor = db.execute(
"SELECT progress, goal FROM milestones WHERE name = ?",
(redeem_name,)
)
milestone = cursor.fetchone()
current_app.logger.error(f"Milestone: {milestone}")
if milestone is None:
cursor = db.execute(
"INSERT INTO milestones(name, progress, goal) VALUES(?, ?, ?)",
(redeem_name, 0, current_app.config['REDEEMS'][redeem_name]['goal'])
)
db.commit()
except Error as e:
current_app.logger.error(f"Error occured adding a milestone: {e.args[0]}")
def add_to_milestone(db, user_id, redeem_name, points_donated):
try:
cursor = db.execute(