-
Notifications
You must be signed in to change notification settings - Fork 98
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
Conversation
jamesoutterside
commented
Apr 1, 2020
•
edited
Loading
edited
- 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 makes sense.
There was a problem hiding this comment.
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 Report
@@ 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
Continue to review full report at Codecov.
|