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 RuntimeError when re-ordering filters within an Alert Profiles filter group #2980

Merged

Conversation

lunkwill42
Copy link
Member

Fixes #2979

This fixes a Python 2-ism that got lost in the conversion to Python 3 a
few years back: The code would iterate over a dictionary while
potentially making modifications to it, and you cannot do that under
Python 3.

This fixes it by instead just iterating over the keys of the original
dictionary that was copied.
@lunkwill42 lunkwill42 self-assigned this Sep 17, 2024
@lunkwill42 lunkwill42 requested a review from a team September 17, 2024 12:00
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.42%. Comparing base (08741f4) to head (adc86c8).
Report is 50 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2980      +/-   ##
==========================================
+ Coverage   56.37%   56.42%   +0.05%     
==========================================
  Files         602      602              
  Lines       43813    43813              
  Branches       48       48              
==========================================
+ Hits        24700    24722      +22     
+ Misses      19101    19079      -22     
  Partials       12       12              

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

@lunkwill42 lunkwill42 merged commit 0d24598 into Uninett:master Sep 23, 2024
12 checks passed
@lunkwill42 lunkwill42 deleted the bugfix/alertprofiles-filtermove-nocrash branch September 23, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Changing filter order in an Alert profiles filter group crashes with a RuntimeError
2 participants