diff --git a/api/organisations/models.py b/api/organisations/models.py index 510a49ca320e..14aee0c60ccc 100644 --- a/api/organisations/models.py +++ b/api/organisations/models.py @@ -267,6 +267,11 @@ def save_as_free_subscription(self): if not getattr(self.organisation, "subscription_information_cache", None): return + # There is a weird bug where the cache is present, but the id is unset. + # See here for more: https://flagsmith.sentry.io/issues/4945988284/ + if not self.organisation.subscription_information_cache.id: + return + self.organisation.subscription_information_cache.delete() def prepare_for_cancel(