diff --git a/core/graphene/object_types.py b/core/graphene/object_types.py index ea9bad4e..c93c0aef 100644 --- a/core/graphene/object_types.py +++ b/core/graphene/object_types.py @@ -396,7 +396,7 @@ class ProductType(DjangoObjectType): filter_fields = ["uuid", "name"] description = _("products") - def resolve_price(self, _info) -> float: + def resolve_price(self: Product, _info) -> float: return self.price or 0.0 def resolve_feedbacks(self: Product, _info): @@ -404,7 +404,7 @@ class ProductType(DjangoObjectType): return Feedback.objects.filter(order_product__product=self) return Feedback.objects.filter(order_product__product=self, is_active=True) - def resolve_feedbacks_count(self, _info) -> int: + def resolve_feedbacks_count(self: Product, _info) -> int: return self.feedbacks_count or 0 def resolve_attribute_groups(self: Product, info): @@ -412,7 +412,7 @@ class ProductType(DjangoObjectType): return AttributeGroup.objects.filter(attributes__values__product=self).distinct() - def resolve_quantity(self, _info) -> int: + def resolve_quantity(self: Product, _info) -> int: return self.quantity or 0