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

Added setting to allow rerate deleted of the same score to address … #188

Merged
merged 3 commits into from
Apr 3, 2020

Conversation

jamesoutterside
Copy link
Contributor

@jamesoutterside jamesoutterside commented Apr 1, 2020

  • Added STAR_RATINGS_RERATE_SAME_DELETE setting for unvote voted object #75
  • Deletes the object, still returns the rating.
  • Tweaked the JS so it goes back to the initial/default state.
  • System check in case user sets it with STAR_RATINGS_RERATE disabled.

@@ -13,3 +13,6 @@ def ready(self):

post_save.connect(calculate_ratings, sender=UserRating)
post_delete.connect(calculate_ratings, sender=UserRating)

# Add System checks
from .checks import rerate_check # NOQA
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I would prefer calling register in here rather than having a decorator to avoid the side effect on importing similar to how we handle the signals above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 makes sense.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, I've updated and am resolving conflicts then will merge down

@codecov-io
Copy link

codecov-io commented Apr 3, 2020

Codecov Report

Merging #188 into develop will increase coverage by 0.12%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #188      +/-   ##
===========================================
+ Coverage    98.25%   98.38%   +0.12%     
===========================================
  Files           13       14       +1     
  Lines          287      309      +22     
===========================================
+ Hits           282      304      +22     
  Misses           5        5              
Impacted Files Coverage Δ
star_ratings/admin.py 93.10% <100.00%> (ø)
star_ratings/app_settings.py 100.00% <100.00%> (ø)
star_ratings/apps.py 100.00% <100.00%> (ø)
star_ratings/checks.py 100.00% <100.00%> (ø)
star_ratings/models.py 100.00% <100.00%> (ø)
star_ratings/views.py 93.18% <100.00%> (+0.49%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c396f4...25bb4c6. Read the comment docs.

@OmegaDroid OmegaDroid merged commit edf7425 into develop Apr 3, 2020
@OmegaDroid OmegaDroid deleted the feature/issue_75_rerate_delete branch April 3, 2020 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants