Skip to content
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

sanitizeResource stripping null valued props from JSONB column #97

Closed
nselikoff opened this issue Apr 26, 2022 · 1 comment · Fixed by #99
Closed

sanitizeResource stripping null valued props from JSONB column #97

nselikoff opened this issue Apr 26, 2022 · 1 comment · Fixed by #99

Comments

@nselikoff
Copy link
Contributor

I have a JSONB column in Hasura called features with data that looks like this:

[
  { "name": "vendor", "value": "Test Vendor" },
  { "name": "brand", "value": null }
]

Note the null value in the second embedded object of the JSONB array.

When this gets parsed by sanitizeResource, the null value prop is stripped out of the data by this line, outputting:

[
  { "name": "vendor", "value": "Test Vendor" },
  { "name": "brand" }
]
arjunyel added a commit to arjunyel/ra-data-hasura that referenced this issue Apr 29, 2022
arjunyel added a commit that referenced this issue Apr 29, 2022
@nselikoff
Copy link
Contributor Author

Thanks for the fix! Can you publish a new release please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant