mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-06 14:48:02 -05:00
fixed zero rating issue
This commit is contained in:
@@ -55,7 +55,7 @@ def recipe_rating(recipe, user):
|
||||
if not user.is_authenticated:
|
||||
return ''
|
||||
rating = recipe.cooklog_set \
|
||||
.filter(created_by=user) \
|
||||
.filter(created_by=user, rating__gte=0) \
|
||||
.aggregate(Avg('rating'))
|
||||
if rating['rating__avg']:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user