Open ekohl opened 2 months ago
The old code failed with:
can't add a new key into hash during iteration
The new code uses transform_keys to change all keys and then iterates all values. While this means it iterates twice, it should at least be safe.
transform_keys
Reported at: https://community.theforeman.org/t/foreman-proxy-monitoring-down-upgrading-foreman-from-3-10-to-3-11/38579/2
Nice catch, should this return the hash after transformation?
Right now it's modified in place and now used like that, but I suppose it could
The old code failed with:
The new code uses
transform_keys
to change all keys and then iterates all values. While this means it iterates twice, it should at least be safe.Reported at: https://community.theforeman.org/t/foreman-proxy-monitoring-down-upgrading-foreman-from-3-10-to-3-11/38579/2