Skip to content

Commit

Permalink
Round to 1 decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
sandewt committed Oct 15, 2020
1 parent 4632a82 commit 847d623
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/com_content/src/Model/ArticlesModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ protected function getListQuery()
// Join on voting table
$query->select(
[
'COALESCE(NULLIF(ROUND(' . $db->quoteName('v.rating_sum') . ' / ' . $db->quoteName('v.rating_count') . ', 0), 0), 0)'
'COALESCE(NULLIF(ROUND(' . $db->quoteName('v.rating_sum') . ' / ' . $db->quoteName('v.rating_count') . ', 1), 0), 0)'
. ' AS ' . $db->quoteName('rating'),
'COALESCE(NULLIF(' . $db->quoteName('v.rating_count') . ', 0), 0) AS ' . $db->quoteName('rating_count'),
]
Expand Down

0 comments on commit 847d623

Please sign in to comment.