-
Notifications
You must be signed in to change notification settings - Fork 312
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
ModelSerializer fields with source
parameter no longer work (regression in 3.5)
#762
Comments
I have a simple fix with test, just not sure how to contribute, probably need permission. |
@dariusmazeika that looks like a good fix! There are already quite a bit of test cases, and with your addition, one could hope that it's getting closer to an exhaustive pattern. If you fork the repository and open a PR, that's sufficient. There are some notes in the README about how to run tests locally. |
@benjaoming done. I placed the test under same test case that was introduced with #722 as I guess it's related, hope that's all good :) |
django-money/djmoney/contrib/django_rest_framework/fields.py
Line 73 in 408ab21
Seems to be introduced with #722.
django - 5.0.3
drf - 3.14.0
djmoney - 3.5.1
python - 3.11
ModelSerializer with MoneyField which has
source
passed in fails to resolvefield_name
fromsource
Can be reproduced with following model and serializer:
The text was updated successfully, but these errors were encountered: