mirror of
https://github.com/simple-login/app.git
synced 2024-11-10 17:35:27 +08:00
Fix subscription might not exist
This commit is contained in:
parent
b8ca2d0158
commit
5d25310105
1 changed files with 3 additions and 3 deletions
|
@ -367,9 +367,9 @@ def setup_paddle_callback(app: Flask):
|
|||
LOG.debug("Cancel subscription %s", subscription_id)
|
||||
|
||||
sub: Subscription = Subscription.get_by(subscription_id=subscription_id)
|
||||
sub.cancelled = True
|
||||
|
||||
db.session.commit()
|
||||
if sub:
|
||||
sub.cancelled = True
|
||||
db.session.commit()
|
||||
|
||||
return "OK"
|
||||
|
||||
|
|
Loading…
Reference in a new issue