roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

Fix handling of `attrs[:managed]` + Refactor `OrgsController#admin_update`

Open aaronskiba opened this issue 7 months ago • 0 comments

Fixes #3528

Changes proposed in this PR:

  • This change resolves issue #3528 by preventing the updating of @org.managed when attrs[:managed] is missing. Prior to this change, the if attrs.key?(:managed) was not present. But it was necessary, because that key is not present when a super user clicks "Save" on the "Request Feedback" page.
  • As a result, if attrs[:managed] was not present, then attrs[:managed] = (attrs[:managed] == '1') would evaluate false, and if @org.update(attrs) (line 81) would subsequently update @org.managed to false in the db.

aaronskiba avatar May 30 '25 23:05 aaronskiba