Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save average rating instead of calculating it with every request #12

Closed
Sarajiko opened this issue May 19, 2022 · 0 comments
Closed

Save average rating instead of calculating it with every request #12

Sarajiko opened this issue May 19, 2022 · 0 comments
Assignees
Labels
api enhancement New feature or request upgrade Needs new version
Milestone

Comments

@Sarajiko
Copy link
Collaborator

In recipe.views.py the average of all ratings for every recipe gets calculated with every request.
Please add a new field to recipe "rating_avg" and update this field with every creation and deletion of a rating.
Do not forget about the migration of existing recipes and ratings and calculate the "rating_avg" in the migration once.

@sepulzera sepulzera added enhancement New feature or request api labels May 19, 2022
sepulzera added a commit that referenced this issue May 22, 2022
@sepulzera sepulzera added this to the v3.1.0 milestone Jul 21, 2022
@sepulzera sepulzera modified the milestones: v3.1.0, v3.2.0 Nov 16, 2022
@sepulzera sepulzera added the upgrade Needs new version label Dec 23, 2022
@sepulzera sepulzera removed this from the v3.2.0 milestone Dec 23, 2022
@sepulzera sepulzera added this to the 3.3.0 milestone Jan 25, 2024
@sepulzera sepulzera self-assigned this Jan 25, 2024
sepulzera added a commit to ownrecipes/ownrecipes-api that referenced this issue Jan 25, 2024
See ownrecipes/OwnRecipes#12

Fixes also ordering of recipes
See ownrecipes/OwnRecipes#42

Fixes also search for recipes without ratings
See ownrecipes/OwnRecipes#65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api enhancement New feature or request upgrade Needs new version
Development

No branches or pull requests

2 participants