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

modified exclude field in UserSerializer to only exclude the fields t… #132

Merged
merged 2 commits into from Jan 17, 2021

Conversation

eelectronn
Copy link
Contributor

Hello, and thanks for creating this very useful project.
This is in response to issue #96
It raises this error when a field is excluded from UserSerializer that is not actually present in user model. Specifically, when a custom user model is implemented by extending the AbstractBaseUser.
The fix involves only excluding the fields that are present in the user model.
Take care.

…hat are part of the User model (default or otherwise).
@eelectronn eelectronn changed the title modified exclude filed in UserSerializer to only exclude the fields t… modified exclude field in UserSerializer to only exclude the fields t… Oct 10, 2020
Copy link

@aalekhpatel07 aalekhpatel07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! I was going to propose the same change. This makes the User model flexible enough to support custom fields.

@eelectronn
Copy link
Contributor Author

This PR solves #137

@st4lk
Copy link
Owner

st4lk commented Jan 17, 2021

Thanks for the update!

@st4lk st4lk merged commit b70e7cc into st4lk:master Jan 17, 2021
@st4lk
Copy link
Owner

st4lk commented Jan 17, 2021

I made some changes here:
#138

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 this pull request may close these issues.

None yet

3 participants