-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Metaclass attribute depth ignores fields attribute #2287
Comments
Hi @PhilipGarnero, thanks for raising the issue. I'm going to be slightly unhelpful at this point and close the issue because it's not sufficiently broken down into an easily actionable ticket - there's simply too much stuff there that's specific to your application and I can't really see what I'm supposed to be looking at. What I'd suggest is that you break this down to the simplest possible case that you can find that demonstrates the issue your seeing. (Eg. a couple of models each with one or two fields.) That process will help nail down if it's actually a bug requiring action, or a usage issue. Once you've got a simple reviewable example I'd be very happy to reopen the ticket and give it further consideration. Apologies for not being more help at this point, but we do need to see tickets presented in a way that makes it easy for us to assess if they are valid issues or not. Thanks for your understanding. |
Looks to me like https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/serializers.py#L1115 should be |
Hello !
I'm having some trouble using nested serialization with drf 3.0.1:
I found out that the depth argument ignores what is set in the fields argument and if I remove it,
I can't have any nested serialization.
I'm a bit stuck at this point, if I remove it I lose the nested serialization but if I let it, it will put everything it encounters in the nested until throwing errors like
AssertionError: May not set both 'read_only' and 'required'
.Here's my code :
Here's what I get when I print a NestedAdventureSerializer's instance:
Thank you in advance for your help !
The text was updated successfully, but these errors were encountered: