Skip to content

Commit 367c145

Browse files
Take care of duplicated products across subcategories
1 parent ce8cdef commit 367c145

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/routes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ def get_category_products(c_id):
268268
.join(subcategory_product)
269269
.join(category_subcategory, onclause=subcategory_product.c.subcategory_id == category_subcategory.c.subcategory_id)
270270
.filter(category_subcategory.c.category_id == c_id)
271+
.distinct()
271272
.paginate(page=page, per_page=2, error_out=False)
272273
)
273274

0 commit comments

Comments
 (0)