Fix 404 error for deleted org
This commit is contained in:
parent
9d42119a09
commit
603b251511
1 changed files with 3 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue