Sunagatov / Iced-Latte

a online Marketplace for coffee retail (Backend)
https://iced-latte.uk
MIT License
610 stars 115 forks source link

(MAIN PAGE-PRODUCT'S CATALOG) incorrect order of products when sorted by average rating #291

Closed Lightness322 closed 6 months ago

Lightness322 commented 7 months ago

Before:

  1. When sorting with parameters: 'sort_attribute=averageRating&sort_direction=desc' we get a list of products that first contains products with averageRating equal to null.
  2. When sorting with parameters: 'sort_attribute=averageRating&sort_direction=asc' we get a list of products that last contains products with averageRating equal to null.

After:

  1. Descending order: Products with averageRating equal to null should be the latest.
  2. Ascending order: Products with averageRating equal to null should come first.
ilsinyakov commented 6 months ago

Tested. Approved.

TetianaPerinha commented 6 months ago

Fixed.