Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImproperlyConfigured: Could not resolve URL for hyperlinked relationship using view name "user-detail". You may have fa... #2720

Open
sentryk8sonalabsorg bot opened this issue Oct 14, 2024 · 0 comments · May be fixed by #2721
Assignees

Comments

@sentryk8sonalabsorg
Copy link

Sentry Issue: ONADATA-STAGING-MS

NoReverseMatch: Reverse for 'user-detail' with keyword arguments '{'pk': 16}' not found. 2 pattern(s) tried: ['api/v1/users/(?P<username>[^/.]+)\\.(?P<format>[a-z0-9]+)/?$', 'api/v1/users/(?P<username>[^/.]+)$']
(1 additional frame(s) were not displayed)
...
  File "rest_framework/relations.py", line 334, in get_url
    return self.reverse(view_name, kwargs=kwargs, request=request, format=format)
  File "rest_framework/reverse.py", line 47, in reverse
    url = _reverse(viewname, args, kwargs, request, format, **extra)
  File "rest_framework/reverse.py", line 60, in _reverse
    url = django_reverse(viewname, args=args, kwargs=kwargs, **extra)
  File "django/urls/base.py", line 88, in reverse
    return resolver._reverse_with_prefix(view, prefix, *args, **kwargs)
  File "django/urls/resolvers.py", line 828, in _reverse_with_prefix
    raise NoReverseMatch(msg)

ImproperlyConfigured: Could not resolve URL for hyperlinked relationship using view name "user-detail". You may have failed to include the related model in your API, or incorrectly configured the `lookup_field` attribute on this field.
(10 additional frame(s) were not displayed)
...
  File "onadata/apps/api/viewsets/dataview_viewset.py", line 168, in list
    return Response(serializer.data)
@FrankApiyo FrankApiyo self-assigned this Oct 14, 2024
@FrankApiyo FrankApiyo linked a pull request Oct 14, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant