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

User.DoesNotExist: User matching query does not exist. #2361

Closed
sentryk8sonalabsorg bot opened this issue Jan 31, 2023 · 0 comments · Fixed by #2362
Closed

User.DoesNotExist: User matching query does not exist. #2361

sentryk8sonalabsorg bot opened this issue Jan 31, 2023 · 0 comments · Fixed by #2362
Assignees
Labels
bugfix Pull requests that solve a bug Size: Small (≤1)

Comments

@sentryk8sonalabsorg
Copy link

Sentry Issue: ONADATA-1T5

KeyError: 'user'
  File "django/db/models/fields/related_descriptors.py", line 173, in __get__
    rel_obj = self.field.get_cached_value(instance)
  File "django/db/models/fields/mixins.py", line 15, in get_cached_value
    return instance._state.fields_cache[cache_name]

User.DoesNotExist: User matching query does not exist.
(14 additional frame(s) were not displayed)
...
  File "onadata/libs/authentication.py", line 174, in authenticate_credentials
    if not token.user.is_active:
  File "django/db/models/fields/related_descriptors.py", line 187, in __get__
    rel_obj = self.get_object(instance)
  File "django/db/models/fields/related_descriptors.py", line 307, in get_object
    return super().get_object(instance)
  File "django/db/models/fields/related_descriptors.py", line 154, in get_object
    return qs.get(self.field.get_reverse_related_filter(instance))
  File "django/db/models/query.py", line 435, in get
    raise self.model.DoesNotExist(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Pull requests that solve a bug Size: Small (≤1)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant