FIX: symbols and strings should be treated similarly while saving custom fields (PR #10486)

GitHub

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/inconsistent-behaviour-in-userupdater-class/161360/6

  • I see some checks are failing but I haven’t touched the frontend code I promise :wink:

Hey @fzngagan this looks good but we will need a test to confirm the functionality and to avoid regressions.

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/custom-field-casting-affected-by-recent-update/122746/6

@eviltrout I uncovered an issue and accounted for all different cases.

Small typo

      it 'allows using string and symbol indices interchangeably' do
         # Update via string index again

@ZogStriP thanks for pointing out the typos. Accepted both the changes :+1:

Thank you!

@eviltrout I think you didn’t squash merge as always but that’s fine I guess? :slight_smile:

regression :frowning: https://meta.discourse.org/t/custom-fields-called-simultaneous-cause-value-to-turn-into-array/162034/2

@sbrighiu I don’t see how this is a regression?

Hi @eviltrout,

It seems to be related from what @fzngagan is saying.

All I know is I call the same endpoint 3-8 at the same time and when I check the custom fields values, they are Arrays instead of Strings.