From 916648cf72d7d06f3b7482214729a8e30386b474 Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Mon, 16 Jun 2025 18:20:36 +0300 Subject: [PATCH] Features: 1) Add resolvers for `big_logo` and `small_logo` in `object_types.py`; Fixes: 1) Ensure logo URLs are returned as absolute paths; Extra: No additional changes. --- core/graphene/object_types.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/graphene/object_types.py b/core/graphene/object_types.py index 0b8eb3b6..33af0fec 100644 --- a/core/graphene/object_types.py +++ b/core/graphene/object_types.py @@ -87,6 +87,12 @@ class BrandType(DjangoObjectType): return self.categories.all() return self.categories.filter(is_active=True) + def resolve_big_logo(self, info): + return info.context.build_absolute_uri(self.big_logo.url) if self.big_logo else "" + + def resolve_small_logo(self, info): + return info.context.build_absolute_uri(self.small_logo.url) if self.small_logo else "" + class FilterableAttributeType(ObjectType): attribute_name = String(required=True)