Skip to content

Conversation

@soininen
Copy link
Contributor

@soininen soininen commented Dec 8, 2025

This PR fixes two bugs:

  • A bug which prevented setting a field, e.g. parameter_value_list_name, back to None
  • A bug where it was possible to change parameter_value_list_name on a parameter definition which had values.

No associated issue.

Checklist before merging

  • Documentation (also in Toolbox repo) is up-to-date
  • Release notes have been updated
  • Unit tests have been added/updated accordingly
  • Code has been formatted by black & isort
  • Unit tests pass

@soininen soininen force-pushed the dont_backup_unchanged_items branch from 3d4b7a1 to f7dcbb4 Compare December 8, 2025 12:48
@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.67%. Comparing base (84ee288) to head (9ac9711).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #601      +/-   ##
==========================================
+ Coverage   85.65%   85.67%   +0.02%     
==========================================
  Files          81       81              
  Lines       11012    11022      +10     
  Branches     1617     1622       +5     
==========================================
+ Hits         9432     9443      +11     
  Misses       1222     1222              
+ Partials      358      357       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This wasn't really a bug, just unoptimal.

The caches should be cleared when the update contains the value field,
not when the merged item has it because the merged item always
includes the field.
Due to an oversight, it wasn't possible to e.g. set value list
back to None for parameter definition. This enables such operations.
Altough a rare use case, this was very much possible when doing
rollback.
Changing value list of a definition that has values is prohibited.
However, we only checked if parameter_value_list_id was updated.
Now we chack parameter_value_list_name, too.
@soininen soininen force-pushed the dont_backup_unchanged_items branch from f7dcbb4 to 9ac9711 Compare December 8, 2025 14:09
@soininen soininen merged commit b416c16 into master Dec 9, 2025
15 checks passed
@soininen soininen deleted the dont_backup_unchanged_items branch December 9, 2025 08:15
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.

2 participants