Skip to content

Commit

Permalink
Support backward relationships. Fixes makinacorpus#23 upstream bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dispiste committed Jan 14, 2015
1 parent 503d149 commit 85fe9bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion djgeojson/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
if self.properties is None or field_name in self.properties:
self.handle_reverse_field(obj, field, field_name)
self.end_object(obj)
Expand Down

0 comments on commit 85fe9bf

Please sign in to comment.