fix bug product list
This commit is contained in:
@@ -164,7 +164,7 @@ class AllProductsView(APIView):
|
||||
products = ProductModel.objects.all()
|
||||
|
||||
if category_slug:
|
||||
if 'category' in category_slug:
|
||||
if 'category' not in category_slug:
|
||||
sub_category = get_object_or_404(SubCategoryModel, slug=category_slug)
|
||||
products = ProductModel.objects.filter(category=sub_category)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user