nrbnlulu / strawberry-django-auth

Authentication system for django using strawberry

Home Page:https://nrbnlulu.github.io/strawberry-django-auth/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

missing migrations?

ranwise opened this issue · comments

Prerequisites

Feel free to just say what you want and remove this template.

  • Is it a bug?
  • Is it a new feature?
  • Is it a question?
  • Can you reproduce the problem?
  • Are you running the latest version?
  • Did you check for similar issues?
  • Did you perform a cursory search?

For more information, see the CONTRIBUTING guide.

Description

Some error with default django user

  File "/usr/local/lib/python3.11/site-packages/gqlauth/user/resolvers.py", line 376, in resolve_mutation
2023-08-14T01:14:38.444619960Z     return ObtainJSONWebTokenType.authenticate(info, input_)
2023-08-14T01:14:38.444621333Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-08-14T01:14:38.444622587Z   File "/usr/local/lib/python3.11/site-packages/gqlauth/jwt/types_.py", line 177, in authenticate
2023-08-14T01:14:38.444623875Z     status: UserStatus = getattr(user, "status")  # noqa: B009
2023-08-14T01:14:38.444625132Z                          ^^^^^^^^^^^^^^^^^^^^^^^
2023-08-14T01:14:38.444626393Z   File "/usr/local/lib/python3.11/site-packages/django/db/models/fields/related_descriptors.py", line 492, in __get__
2023-08-14T01:14:38.444631515Z     raise self.RelatedObjectDoesNotExist(
2023-08-14T01:14:38.444632791Z django.contrib.auth.models.User.status.RelatedObjectDoesNotExist: User has no status.

but when run makemigrations gqlauth and migrate work fine

Steps to Reproduce

If we need to reproduce and you don't provide steps for it, it will be closed. Alternatively, you can link a repo with the code to run your issue.

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior

What you expected to happen

Actual behavior

What actually happened

Requirements

Paste the packages you are using, you can get this information from executing pip freeze.

Happened on my setup also.