-
Notifications
You must be signed in to change notification settings - Fork 271
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
AssertionError on model_field with m2m #323
Comments
@lerela all good, i'm glad someone is testing this before i release in i guess we are not done yet. these 10 lines are a whack-a-mole. |
fixed several inconsistencies that lead to problems. this includes 2 unreported "bugs" that hid behind this issue. it basically comes down to unhandled DRF internal mechanics and an under-specified interface to its a hefty change, so please check for differences |
This seems to fix the issue and I have not seen side effects − but my use cases are not so intricate. Well done 👍 |
Describe the bug
Sorry @tfranzel for spamming the bug reports! This looks like a regression in 0.13.2 (also in master).
If I have a simple m2m relationship:
and I try to serialize the m2m relationship (without any django-filter involved):
Then I'm getting a strange warning and an AssertionError:
However this works if I do not use
read_only=True
and provide a queryset.Also, this works as expected with 0.13.1. Error with 0.13.2 is different from master (
django.core.exceptions.FieldDoesNotExist: TestModel has no field named 'reltd_set'
).The text was updated successfully, but these errors were encountered: