Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Can't retrieve ApiInfo by user name #31

Open
HadleyKing opened this issue Sep 13, 2022 · 0 comments
Open

Can't retrieve ApiInfo by user name #31

HadleyKing opened this issue Sep 13, 2022 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@HadleyKing
Copy link
Contributor

Screen Shot 2022-09-13 at 8 29 53 AM

Internal Server Error: /users/token-auth/
Traceback (most recent call last):
  File "/Users/hadleyking/GitHub/biocompute-objects/dev/userdb/env/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/Users/hadleyking/GitHub/biocompute-objects/dev/userdb/env/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/hadleyking/GitHub/biocompute-objects/dev/userdb/env/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/Users/hadleyking/GitHub/biocompute-objects/dev/userdb/env/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/Users/hadleyking/GitHub/biocompute-objects/dev/userdb/env/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/Users/hadleyking/GitHub/biocompute-objects/dev/userdb/env/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/Users/hadleyking/GitHub/biocompute-objects/dev/userdb/env/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/Users/hadleyking/GitHub/biocompute-objects/dev/userdb/env/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/Users/hadleyking/GitHub/biocompute-objects/dev/userdb/env/lib/python3.8/site-packages/rest_framework_jwt/views.py", line 58, in post
    response_data = jwt_response_payload_handler(token, user, request)
  File "/Users/hadleyking/GitHub/biocompute-objects/dev/userdb/portalusers/utils.py", line 48, in my_jwt_response_handler
    api_object = ApiInfo.objects.get(token=api['token'])
  File "/Users/hadleyking/GitHub/biocompute-objects/dev/userdb/env/lib/python3.8/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/Users/hadleyking/GitHub/biocompute-objects/dev/userdb/env/lib/python3.8/site-packages/django/db/models/query.py", line 433, in get
    raise self.model.MultipleObjectsReturned(
core.models.ApiInfo.MultipleObjectsReturned: get() returned more than one ApiInfo -- it returned 2!
@HadleyKing HadleyKing added the bug Something isn't working label Sep 13, 2022
@HadleyKing HadleyKing added this to the 22.10 milestone Sep 13, 2022
@HadleyKing HadleyKing self-assigned this Sep 13, 2022
@HadleyKing HadleyKing modified the milestones: 22.11, 22.12 Nov 16, 2022
@HadleyKing HadleyKing modified the milestones: 22.12, 23/01 Dec 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant