twenty icon indicating copy to clipboard operation
twenty copied to clipboard

Fix Raw Json Null Error

Open rajatsingh23 opened this issue 5 months ago • 2 comments

Closes #12932

What this PR does

Fixes an error that occurred when null was passed to persistField for RAW_JSON fields.

Changes made

  • Removed unsafe persistField(null) call.
  • Updated persistJsonField to safely parse JSON and skip invalid values.

Testing

  • Manually tested clicking outside with empty and valid JSON.
  • No error thrown, field saves only when JSON is valid.

Related

No related issue, minor internal improvement.

rajatsingh23 avatar Jun 30 '25 13:06 rajatsingh23

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:2027

This environment will automatically shut down when the PR is closed or after 5 hours.

github-actions[bot] avatar Jun 30 '25 13:06 github-actions[bot]

Thanks for your contribution, @rajatsingh23! I made a minor update to prevent persisting fields where specific logic has already been written for JSON fields.

Devessier avatar Jul 02 '25 13:07 Devessier

@Devessier I'll make sure to handle such cases in the core logic in future PRs

rajatsingh23 avatar Jul 03 '25 11:07 rajatsingh23