API: Fix creation of embedded variations with explicit sales channels

This commit is contained in:
Raphael Michel
2024-07-02 09:25:19 +02:00
parent 075b9c187f
commit cd57f1f024
3 changed files with 32 additions and 3 deletions

View File

@@ -585,7 +585,7 @@ class CheckinListOrderPositionSerializer(OrderPositionSerializer):
self.fields['item'] = ItemSerializer(read_only=True, context=self.context)
if 'variation' in self.context['expand']:
self.fields['variation'] = InlineItemVariationSerializer(read_only=True)
self.fields['variation'] = InlineItemVariationSerializer(read_only=True, context=self.context)
if 'answers.question' in self.context['expand']:
self.fields['answers'].child.fields['question'] = QuestionSerializer(read_only=True)