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

Updating with 'null' value of Scripture References produces error #1132

Open
elisabeth-sorrell opened this issue Jun 9, 2022 · 2 comments
Open

Comments

@elisabeth-sorrell
Copy link
Contributor

elisabeth-sorrell commented Jun 9, 2022

Steps to Reproduce:

  • Create a Project - Language Engagement - Goal (with minimal fields)
  • Edit the goal, enter a change that doesn't include updating the scripture reference
  • Error Cannot read properties of null (reading 'length')

Expected Result
No error.

This is happening because a null for scriptureReferences is being sent to the API instead of an EmptyList []. The field for scriptureReference needs to be adjusted to send an empty array instead of a null value, and it would be nice to let the ScriptureReference field type from the API side allow nullable to only be an empty list instead of null | EmptyList type to safeguard against input with null values.

┆Issue is synchronized with this Monday item by Unito

@CarsonF
Copy link
Member

CarsonF commented Jul 7, 2022

IMO this should be handled on the API side. If the graph schema says it's nullable, then null should be able to be passed in. If that needs to be converted to an empty array there it can happen internally.

@sherijennings sherijennings moved this to Project Backlog (someday) in CORD Sep 28, 2022
@sherijennings sherijennings moved this from Project Backlog (someday) to Iteration Planning (next) in CORD Sep 28, 2022
@sethmcknight sethmcknight moved this from Iteration Planning (next) to Planning (later) in CORD Oct 3, 2022
@CarsonF
Copy link
Member

CarsonF commented Nov 21, 2022

Related SeedCompany/cord-api-v3#2522

@SeedCompany SeedCompany deleted a comment from sync-by-unito bot Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Planning (later)
Development

No branches or pull requests

2 participants