Skip to content

Commit

Permalink
fix #802: Error with REST serializer when adding to cart
Browse files Browse the repository at this point in the history
  • Loading branch information
jrief committed Apr 11, 2020
1 parent 57f9729 commit 8c5d1f6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions shop/rest/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class JSONSerializerField(serializers.Field):
"""
Serializer field which transparently bypasses its object instead of serializing/deserializing.
"""
def __init__(self, encoder=None, **kwargs):
super(JSONSerializerField, self).__init__(**kwargs)

def to_representation(self, obj):
return obj

Expand Down

0 comments on commit 8c5d1f6

Please sign in to comment.