-
Notifications
You must be signed in to change notification settings - Fork 0
Handle case that an array is passed to convert_array
#39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
I'm not sure we want to support multiple ways to store the JSON data. Is it possible that Rails has always been converting the JSON for us and this never worked? |
That is possible! With NBU there was a field ("status" on person records) that was successfully indexed the first few times we ran the Typesense scripts and then at some point the client noticed that newer data wasn't showing up; but in that case I believe the field was changed to |
|
Yeah, I think we should assume that the |
|
Updated to just remove the |
|
Is there an issue we can connect this to? |
I linked performant-software/core-data-cloud#523 in the description; should I also create an issue in this repo for it? |
Ah, perfect. I missed that. 👍 |
In this PR
Addresses performant-software/core-data-cloud#523 by checking whether the passed value is already of type
Arraybefore applyingJSON.parse.Notes and questions
For maximum flexibility and backwards compatibility I am not assuming here that the value in this case will always be an array; I'm not sure why or at what point something changed so that it's actually being parsed as an array automatically without needing to be parsed, but I figure it can't hurt to just support both cases?