Fixes for rebasing of the release on 2015-09-23

This commit is contained in:
Brian Beggs
2015-09-22 20:26:07 -04:00
parent 322db6de7a
commit 53524efbd8
2 changed files with 6 additions and 9 deletions

View File

@@ -28,9 +28,7 @@ class ExpandableField(Field):
if field.source is None:
field.bind(self.field_name, self)
# Exclude fields that should not be expanded in the nested field
if should_expand:
nested_expand_fields = set(field.context.get("expand", []))
self.expanded.context["expand"] = list(nested_expand_fields - self.exclude_expand_fields)
self.expanded.context["expand"] = set(field.context.get("expand", []))
return field.to_representation(obj)