Skip to content

Commit

Permalink
renamed for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
specialunderwear committed Oct 9, 2023
1 parent 353d735 commit 8569a0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions oscarapi/serializers/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def get_value(self, dictionary):
# return all the data because this field uses everything
return dictionary

def get_data_attribute(self, data):
def to_product_attribute(self, data):
if "product" in data:
# we need the attribute to determine the type of the value
return ProductAttribute.objects.get(
Expand Down Expand Up @@ -152,7 +152,7 @@ def to_internal_value(self, data): # noqa
code, value = attribute_details(data)
internal_value = value

attribute = self.get_data_attribute(data)
attribute = self.to_product_attribute(data)

internal_value = self.to_attribute_type_value(attribute, code, value)

Expand Down

0 comments on commit 8569a0c

Please sign in to comment.