-
Notifications
You must be signed in to change notification settings - Fork 69
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
Support backward relationships. Fixes #23 upstream bug #44
base: master
Are you sure you want to change the base?
Conversation
@@ -334,7 +334,7 @@ def serialize_queryset(self, queryset): | |||
|
|||
for field in reversed_fields: | |||
if field.serialize: | |||
field_name = field.rel.related_name or opts.object_name.lower() | |||
field_name = field.rel.related_name or (field.model._meta.object_name.lower()+'_set') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you could split this line and name intermediary variable explicity :)
Thanks for take care of this! The issue has been here for a while :) Would you mind adding a little test to assert that the behaviour you just fixed will remain fixed forever :) Thanks ! |
Hi Mathieu, I will try to write the test in the following days. Thanks! On 15 January 2015 at 09:54, Mathieu Leplatre [email protected]
César Martínez Izquierdo Blog: http://geotechnotes.wordpress.com/ |
Hi @dispiste ! Do you need help to write a small |
Hi @leplatrem , I have not found the time to write the test yet. I'd be happy if you can write it, or I'll do it when I find a free slot. Thanks! |
This is certainly a much needed fix. I can aid in the test to make this merge if necessary. |
Thanks @aboutaaron for your proposition! Yes please! Without test we can't merge this :) |
@aboutaaron @dispiste this cannot be merged without tests unfortunately... |
Great if you can add the test, I don't currently have the time to do so. On 8 February 2016 at 22:46, Mathieu Leplatre [email protected]
César Martínez Izquierdo SCOLAB: http://www.scolab.es |
e683d04
to
8198f63
Compare
I found a workaround... If you want to use the GeoDjango serializer alongside django-geodjango, then go into settings and where you added this (probably years ago)
change |
840b07b
to
dfefa70
Compare
No description provided.