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.
This commit is contained in:
parent
576c7618e7
commit
916648cf72
1 changed files with 6 additions and 0 deletions
|
|
@ -87,6 +87,12 @@ class BrandType(DjangoObjectType):
|
||||||
return self.categories.all()
|
return self.categories.all()
|
||||||
return self.categories.filter(is_active=True)
|
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):
|
class FilterableAttributeType(ObjectType):
|
||||||
attribute_name = String(required=True)
|
attribute_name = String(required=True)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue