Fix 404 error for deleted org

This commit is contained in:
cuom1999 2023-02-21 14:20:14 -06:00
parent 9d42119a09
commit 603b251511

View file

@ -139,6 +139,8 @@ class OrganizationMixin(OrganizationBase):
self.organization_id = int(kwargs["pk"])
self.organization = get_object_or_404(Organization, id=self.organization_id)
except Http404:
key = None
if hasattr(self, "slug_url_kwarg"):
key = kwargs.get(self.slug_url_kwarg, None)
if key:
return generic_message(