Form improvements and bug fixes #122

Merged
rixx merged 9 commits from 32-form-improvements into main 2025-06-26 12:32:59 +00:00
Showing only changes of commit b29ef95c89 - Show all commits

View file

@ -20,6 +20,10 @@ class OrganizationMiddleware:
organization_slug = url.kwargs.get("organization")
if organization_slug:
pk = organization_slug.rsplit("-", maxsplit=1)[-1]
try:
pk = int(pk)
except ValueError:
pk = -1
request.organization = get_object_or_404(Organization, pk=pk)
with scope(organization=request.organization):
return self.get_response(request)