Skip to content

Commit

Permalink
Make sure to only return attributevalues that are on the actual produ…
Browse files Browse the repository at this point in the history
…ct to avoid transferring

attributesvalues from parent to child.
  • Loading branch information
specialunderwear committed Jan 24, 2024
1 parent 6433597 commit 7925ef9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oscarapi/serializers/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def update(self, instance, validated_data):
# child product.
product.attr._dirty.clear() # pylint: disable=protected-access
product.attr.save()
return list(product.attr.get_values().filter(attribute__code__in=attr_codes))
return list(product.attribute_values.filter(attribute__code__in=attr_codes))


class ProductAttributeValueSerializer(OscarModelSerializer):
Expand Down

0 comments on commit 7925ef9

Please sign in to comment.