Features: 1) Update category root logic to retrieve the first family member instead of the root node;
Fixes: None; Extra: None;
This commit is contained in:
parent
529fd39ff4
commit
82f59307bf
1 changed files with 1 additions and 1 deletions
|
|
@ -63,7 +63,7 @@ class ProductDocument(_BaseDoc):
|
||||||
return float(obj.price) if obj.price else 0.0
|
return float(obj.price) if obj.price else 0.0
|
||||||
|
|
||||||
def prepare_top_level(self, obj):
|
def prepare_top_level(self, obj):
|
||||||
root = obj.category.get_root() if obj.category else None
|
root = obj.category.get_family().first() if obj.category else None
|
||||||
return root.slug if root else "other"
|
return root.slug if root else "other"
|
||||||
|
|
||||||
def prepare_product_type(self, obj):
|
def prepare_product_type(self, obj):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue