forked from wiktor/spejstore-new
Fix label insertion
This commit is contained in:
parent
98313721b9
commit
09c1ac39bd
|
@ -10,6 +10,7 @@ class ItemSerializer(HStoreSerializer):
|
||||||
|
|
||||||
class LabelSerializer(serializers.ModelSerializer):
|
class LabelSerializer(serializers.ModelSerializer):
|
||||||
item = ItemSerializer()
|
item = ItemSerializer()
|
||||||
|
item_id = serializers.PrimaryKeyRelatedField(queryset=Item.objects, source='item')
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Label
|
model = Label
|
||||||
fields = ('id', 'item', 'style')
|
fields = ('id', 'item', 'item_id', 'style')
|
||||||
|
|
Loading…
Reference in New Issue