Skip to content

fix lint #369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions oscarapi/basket/operations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"This module contains operation on baskets and lines"

from django.conf import settings

from oscar.core.loading import get_class, get_model
Expand Down
4 changes: 4 additions & 0 deletions oscarapi/serializers/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ class Meta:

class BaseProductSerializer(OscarModelSerializer):
"Base class shared by admin and public serializer"

attributes = ProductAttributeValueSerializer(
many=True, required=False, source="attribute_values"
)
Expand Down Expand Up @@ -476,6 +477,7 @@ class Meta:

class PublicProductSerializer(BaseProductSerializer):
"Serializer base class used for public products api"

url = serializers.HyperlinkedIdentityField(view_name="product-detail")
price = serializers.HyperlinkedIdentityField(
view_name="product-price", read_only=True
Expand All @@ -494,6 +496,7 @@ def get_field_names(self, declared_fields, info):

class ChildProductSerializer(PublicProductSerializer):
"Serializer for child products"

parent = serializers.HyperlinkedRelatedField(
view_name="product-detail",
queryset=Product.objects.filter(structure=Product.PARENT),
Expand All @@ -508,6 +511,7 @@ class Meta(PublicProductSerializer.Meta):

class ProductSerializer(PublicProductSerializer):
"Serializer for public api with strategy fields added for price and availability"

url = serializers.HyperlinkedIdentityField(view_name="product-detail")
price = serializers.HyperlinkedIdentityField(
view_name="product-price", read_only=True
Expand Down
Loading