Use KeyValueForm getter/setter methods in DiffSettingsForm.

Review Request #14436 — Created May 13, 2025 and submitted

Information

Review Board
release-7.1.x

Reviewers

The DiffSettingsForm has a few things which are handled specially (in
order to serialize and deserialize certain settings where the UI doesn't
map trivially to the settings keys). These were written to read and
write directly from the siteconfig.

This change makes it so those use the base KeyValueForm
get_key_value() and set_key_value() methods instead. The
implementation of those ends up doing the same thing as the current
code, but will allow us to subclass this form in RBCommons and override
those methods to try reading and writing from the LocalSite instead.

  • Ran unit tests.
  • Edited diff settings and verified that it all still worked correctly.
Summary ID
Use KeyValueForm getter/setter methods in DiffSettingsForm.
The `DiffSettingsForm` has a few things which are handled specially (in order to serialize and deserialize certain settings where the UI doesn't map trivially to the settings keys). These were written to read and write directly from the `siteconfig`. This change makes it so those use the base `KeyValueForm` `get_key_value()` and `set_key_value()` methods instead. The implementation of those ends up doing the same thing as the current code, but will allow us to subclass this form in RBCommons and override those methods to try reading and writing from the `LocalSite` instead. Testing Done: - Ran unit tests. - Edited diff settings and verified that it all still worked correctly.
f71ddb2699402d55e9d6b61c6af593f2fce273c2
Description From Last Updated

I believe this was fixed upstream, but to be sure, this (and others) must be Dict instead of dict for …

chipx86chipx86
There are no open issues
maubin
  1. Ship It!
  2. 
      
chipx86
  1. 
      
  2. Show all issues

    I believe this was fixed upstream, but to be sure, this (and others) must be Dict instead of dict for the supported versions of Python.

    Same with lists below.

  3. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-7.1.x (7421374)
Loading...