-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Error: 'BoundField' object is not iterable in Python3 #3153
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
Comments
Hmm now I see that there is a I will continue with investigation. |
A bit more context would help, in particular why do you have a |
The problem is caused by this commit 6b08e97
@tomchristie can you look at this because you implemented |
Yup sounds like a bug against master as part of resolving some other stuff. I'll have a dig. |
I will try to write something tomorrow. This affects only browsable API. If you just get JSON responses via AJAX, everything is working normally. |
Now resolved. Thanks for the report! |
I think that it is not. Now it raises |
Noted. Shame we don't yet have test coverage over this. |
Okay, looks sane to me now. Worth verifying @vstoykov? |
It's ok now. I've created a test that will fail if executed before last change. After the last change is Ok. You can look at it and if you are ok with it I can make a pull request. |
@vstoykov That would probably be a good plan - thanks! |
When I use Python3 an have nested model serializers I see this error:
I made a little investigation and found that BoundField proxy does not work for some reason.
I run in Python console (both Python2 and Python3) this example code:
These example classes use the same logic as
Serialzier
andBoundField
classes in DRF.The text was updated successfully, but these errors were encountered: