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

fix: only send state change notifications once #7953

Merged
merged 5 commits into from
Sep 18, 2024

Conversation

jennifer-richards
Copy link
Member

This avoids sending multiple copies of a state change notification to a CommunityList subscriber. This is accomplished by checking whether created is True in the call to our signal handler. (Relevant Django docs)

Refactors the rfceditor sync code where we were triggering the double notifications to do its updates before the save() call.

The refactoring would resolve the issue without the check of the created flag in our signal handler, but I think the guard is worth it. I did a fairly thorough but probably not exhaustive skim for other places where we might save a DocEvent twice and did not find any.

Copy link

codecov bot commented Sep 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.83%. Comparing base (c7f6bde) to head (46b4131).
Report is 76 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7953      +/-   ##
==========================================
+ Coverage   88.78%   88.83%   +0.04%     
==========================================
  Files         296      304       +8     
  Lines       41320    41517     +197     
==========================================
+ Hits        36687    36882     +195     
- Misses       4633     4635       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rjsparks rjsparks merged commit c6389ba into ietf-tools:main Sep 18, 2024
8 of 9 checks passed
@jennifer-richards jennifer-richards deleted the single-notification branch September 18, 2024 19:04
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants