mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-30 21:49:50 -05:00
fixed old search rating
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, rating__gte=0) \
|
||||
.filter(created_by=user, rating__gt=0) \
|
||||
.aggregate(Avg('rating'))
|
||||
if rating['rating__avg']:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user