dracidoupe / graveyard

Open Source reimplementation of https://www.dracidoupe.cz/
https://nove.dracidoupe.cz/
MIT License
6 stars 4 forks source link

Bad redirect for UserProfiles causing exception #462

Open Almad opened 3 months ago

Almad commented 3 months ago

https://almad.sentry.io/share/issue/3137cf4bef8041ab90748195f07ff532/

UserProfile.MultipleObjectsReturned: get() returned more than one UserProfile -- it returned more than 20!
  File "django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "django/views/decorators/http.py", line 40, in inner
    return func(request, *args, **kwargs)
  File "ddcz/views/legacy.py", line 112, in legacy_router
    user_profile = get_object_or_404(UserProfile)
  File "django/shortcuts.py", line 76, in get_object_or_404
    return queryset.get(*args, **kwargs)
  File "django/db/models/query.py", line 433, in get
    raise self.model.MultipleObjectsReturned(