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:
Egor Pavlovich Gorbunov 2025-06-19 14:54:36 +03:00
parent 529fd39ff4
commit 82f59307bf

View file

@ -63,7 +63,7 @@ class ProductDocument(_BaseDoc):
return float(obj.price) if obj.price else 0.0
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"
def prepare_product_type(self, obj):