Skip to content

Commit

Permalink
Ensuring extra_context is coerced into a dict
Browse files Browse the repository at this point in the history
  • Loading branch information
respondcreate committed May 29, 2015
1 parent abe333d commit cd8fe40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion textplusstuff/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def to_representation(self, instance):
payload = super(
ExtraContextSerializerMixIn, self
).to_native(instance)
extra_context = copy.copy(self.context)
extra_context = copy.copy(self.context) or {}
extra_context.pop('view', None)
extra_context.pop('request', None)
extra_context.pop('format', None)
Expand Down

0 comments on commit cd8fe40

Please sign in to comment.