bugfix: check_apply_milestone was []ing None
This commit is contained in:
parent
1b02624dea
commit
d372ed6e6b
|
@ -124,14 +124,15 @@ def check_apply_milestone_completion(db, redeem_name):
|
||||||
current_app.logger.warning("Milestone not found in database.")
|
current_app.logger.warning("Milestone not found in database.")
|
||||||
current_app.logger.warning("Maybe you forgot to run the refresh-milestones CLI command "
|
current_app.logger.warning("Maybe you forgot to run the refresh-milestones CLI command "
|
||||||
"after you added a new milestone to the config?")
|
"after you added a new milestone to the config?")
|
||||||
progress, goal = row
|
else:
|
||||||
if progress == goal:
|
progress, goal = row
|
||||||
cursor = db.execute(
|
if progress == goal:
|
||||||
"UPDATE milestones SET complete = TRUE WHERE name = ?",
|
cursor = db.execute(
|
||||||
(redeem_name,)
|
"UPDATE milestones SET complete = TRUE WHERE name = ?",
|
||||||
)
|
(redeem_name,)
|
||||||
db.commit()
|
)
|
||||||
return True
|
db.commit()
|
||||||
|
return True
|
||||||
return False
|
return False
|
||||||
except Error as e:
|
except Error as e:
|
||||||
current_app.logger.error(f"Error occured applying milestone completion: {e.args[0]}")
|
current_app.logger.error(f"Error occured applying milestone completion: {e.args[0]}")
|
||||||
|
|
Loading…
Reference in New Issue