Merge branch 'main' into storefront-nuxt

This commit is contained in:
Egor Pavlovich Gorbunov 2025-11-12 12:53:49 +03:00
commit 945767fe01

View file

@ -235,7 +235,7 @@ class CategoryType(DjangoObjectType): # type: ignore [misc]
return result
def resolve_image(self: Category, info) -> str:
return self.image_url
return info.context.build_absolute_uri(self.image.url) if self.image else ""
def resolve_markup_percent(self: Category, info) -> float:
if info.context.user.has_perm("core.view_category"):
@ -466,8 +466,8 @@ class ProductImageType(DjangoObjectType): # type: ignore [misc]
filter_fields = ["uuid"]
description = _("product's images")
def resolve_image(self: ProductImage, _info):
return self.image_url
def resolve_image(self: ProductImage, info):
return info.context.build_absolute_uri(self.image.url) if self.image else ""
class ProductType(DjangoObjectType): # type: ignore [misc]