Fix logged out bug for most recent organizations
This commit is contained in:
parent
30f1c105cb
commit
8f15e327b8
1 changed files with 5 additions and 1 deletions
|
@ -127,7 +127,6 @@ class OrganizationMixin(OrganizationBase):
|
||||||
context["logo_override_image"] = self.organization.logo_override_image
|
context["logo_override_image"] = self.organization.logo_override_image
|
||||||
if "organizations" in context:
|
if "organizations" in context:
|
||||||
context.pop("organizations")
|
context.pop("organizations")
|
||||||
OrganizationProfile.add_organization(self.request.profile, self.organization)
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
def dispatch(self, request, *args, **kwargs):
|
def dispatch(self, request, *args, **kwargs):
|
||||||
|
@ -152,6 +151,11 @@ class OrganizationMixin(OrganizationBase):
|
||||||
return HttpResponsePermanentRedirect(
|
return HttpResponsePermanentRedirect(
|
||||||
request.get_full_path().replace(kwargs["slug"], self.organization.slug)
|
request.get_full_path().replace(kwargs["slug"], self.organization.slug)
|
||||||
)
|
)
|
||||||
|
if self.request.user.is_authenticated:
|
||||||
|
OrganizationProfile.add_organization(
|
||||||
|
self.request.profile, self.organization
|
||||||
|
)
|
||||||
|
|
||||||
return super(OrganizationMixin, self).dispatch(request, *args, **kwargs)
|
return super(OrganizationMixin, self).dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue