Skip to content

Commit

Permalink
Avoid errors when missing subscription_information_cache.id
Browse files Browse the repository at this point in the history
  • Loading branch information
zachaysan committed Feb 5, 2024
1 parent e8bc7d3 commit 9415c63
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/organisations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ def save_as_free_subscription(self):
if not getattr(self.organisation, "subscription_information_cache", None):
return

if not self.organisation.subscription_information_cache.id:
return

self.organisation.subscription_information_cache.delete()

def prepare_for_cancel(
Expand Down

0 comments on commit 9415c63

Please sign in to comment.