1👍
✅
The problem is in this method:
def get_brands(self):
return Product.objects.filter(category__in=self.get_descendants(include_self=True) , brand=product__brand) #This line
It should be:
return Product.objects.filter(category__in=self.get_descendants(include_self=True) , brand= 'something') # instead of product__brand
Source:stackexchange.com