Skip to content

Commit

Permalink
server: Enhanced code documentation for early cancellation exit
Browse files Browse the repository at this point in the history
  • Loading branch information
birkjernstrom committed Jan 3, 2025
1 parent 6706b37 commit 75c11e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/polar/subscription/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,8 @@ async def update(

cancel = updates.cancel_at_period_end is True
uncancel = updates.cancel_at_period_end is False
if not (updates.revoke or cancel or uncancel):
# Exit early unless we're asked to revoke, cancel or uncancel
if not any((updates.revoke, cancel, uncancel)):
return subscription

if updates.revoke and (cancel or uncancel):
Expand Down

0 comments on commit 75c11e5

Please sign in to comment.