Merge branch 'main' into storefront-nuxt
This commit is contained in:
commit
945767fe01
1 changed files with 3 additions and 3 deletions
|
|
@ -235,7 +235,7 @@ class CategoryType(DjangoObjectType): # type: ignore [misc]
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def resolve_image(self: Category, info) -> str:
|
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:
|
def resolve_markup_percent(self: Category, info) -> float:
|
||||||
if info.context.user.has_perm("core.view_category"):
|
if info.context.user.has_perm("core.view_category"):
|
||||||
|
|
@ -466,8 +466,8 @@ class ProductImageType(DjangoObjectType): # type: ignore [misc]
|
||||||
filter_fields = ["uuid"]
|
filter_fields = ["uuid"]
|
||||||
description = _("product's images")
|
description = _("product's images")
|
||||||
|
|
||||||
def resolve_image(self: ProductImage, _info):
|
def resolve_image(self: ProductImage, info):
|
||||||
return self.image_url
|
return info.context.build_absolute_uri(self.image.url) if self.image else ""
|
||||||
|
|
||||||
|
|
||||||
class ProductType(DjangoObjectType): # type: ignore [misc]
|
class ProductType(DjangoObjectType): # type: ignore [misc]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue