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 (de)activating alert profiles #2732

Merged

Conversation

johannaengland
Copy link
Contributor

@ingeborgoh sent us a very helpful mail letting us know that it is not possible to deactivate alert profiles.

This PR fixes that bug by avoiding deleting elements of a dictionary that is iterated over and also adds tests for that case.

Copy link

sonarcloud bot commented Nov 13, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link

codecov bot commented Nov 13, 2023

Codecov Report

Merging #2732 (c08f762) into 5.7.x (ccb83d1) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##            5.7.x    #2732   +/-   ##
=======================================
  Coverage   55.19%   55.20%           
=======================================
  Files         561      561           
  Lines       40917    40917           
=======================================
+ Hits        22584    22587    +3     
+ Misses      18333    18330    -3     
Files Coverage Δ
python/nav/web/alertprofiles/views.py 43.23% <100.00%> (+0.30%) ⬆️

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

Copy link

Test results

     12 files       12 suites   13m 24s ⏱️
3 219 tests 3 219 ✔️ 0 💤 0
9 132 runs  9 132 ✔️ 0 💤 0

Results for commit c08f762.

Copy link
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

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

Ah, the old "modifying a dict while you're iterating it" issue. Classic :)

@johannaengland johannaengland merged commit aafdcb6 into Uninett:5.7.x Nov 13, 2023
12 checks passed
@johannaengland johannaengland deleted the bugfix/deactivate-alert-profile branch November 13, 2023 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants