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,7 +139,9 @@ class OrganizationMixin(OrganizationBase):
|
||||||
self.organization_id = int(kwargs["pk"])
|
self.organization_id = int(kwargs["pk"])
|
||||||
self.organization = get_object_or_404(Organization, id=self.organization_id)
|
self.organization = get_object_or_404(Organization, id=self.organization_id)
|
||||||
except Http404:
|
except Http404:
|
||||||
key = kwargs.get(self.slug_url_kwarg, None)
|
key = None
|
||||||
|
if hasattr(self, "slug_url_kwarg"):
|
||||||
|
key = kwargs.get(self.slug_url_kwarg, None)
|
||||||
if key:
|
if key:
|
||||||
return generic_message(
|
return generic_message(
|
||||||
request,
|
request,
|
||||||
|
|
Loading…
Reference in a new issue