Fix the case where user cancels and re-subscribes

This commit is contained in:
Son NK 2020-03-02 23:04:47 +01:00
parent 7e4eb9e0db
commit 930b4cadb9
1 changed files with 4 additions and 0 deletions

View File

@ -379,6 +379,10 @@ def setup_paddle_callback(app: Flask):
).date()
sub.plan = plan
# make sure to set the new plan as not-cancelled
# in case user cancels a plan and subscribes a new plan
sub.cancelled = False
LOG.debug("User %s upgrades!", user)
db.session.commit()