Skip to content

Commit

Permalink
fix(editor-requests): 404 instead of 500 when user is migrated to a d…
Browse files Browse the repository at this point in the history
…ifferent section
  • Loading branch information
thejoeejoee committed Sep 15, 2024
1 parent 3ff8dbd commit 2fb9e2f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fiesta/apps/sections/views/membership.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
with_object_breadcrumb,
with_plugin_home_breadcrumb,
)
from apps.utils.models.query import get_single_object_or_none


def page_title(view: DetailView | View) -> BreadcrumbItem:
Expand Down Expand Up @@ -161,7 +160,7 @@ class UserDetailRedirectView(
):
def get_redirect_url(self, *args, **kwargs):
user = get_object_or_404(User, pk=kwargs.get("pk"))
membership = get_single_object_or_none(
membership = get_object_or_404(
self.request.in_space_of_section.memberships,
user=user,
)
Expand Down

0 comments on commit 2fb9e2f

Please sign in to comment.