Fix slug bug

This commit is contained in:
cuom1999 2022-05-30 05:54:21 -05:00
parent e269a4d63f
commit d1d0c6e1f4

View file

@ -137,7 +137,7 @@ class OrganizationMixin(OrganizationBase):
) )
if self.organization.slug != kwargs["slug"]: if self.organization.slug != kwargs["slug"]:
return HttpResponsePermanentRedirect( return HttpResponsePermanentRedirect(
request.get_full_path().replace(kwargs["slug"], self.object.slug) request.get_full_path().replace(kwargs["slug"], self.organization.slug)
) )
return super(OrganizationMixin, self).dispatch(request, *args, **kwargs) return super(OrganizationMixin, self).dispatch(request, *args, **kwargs)