Skip to content

A field with type as optional may correspond to a None object and should not be parsed.#641

Merged
gsaluja9 merged 3 commits into
developfrom
handle_optional_items
Jan 12, 2026
Merged

A field with type as optional may correspond to a None object and should not be parsed.#641
gsaluja9 merged 3 commits into
developfrom
handle_optional_items

Conversation

@gsaluja9
Copy link
Copy Markdown
Contributor

@gsaluja9 gsaluja9 commented Jan 9, 2026

If a Datamodel field is optional, the pydantic validation should allow the object to be created.
We should support such objects when creating a query in the DataModels as they represent a valid usecase.

This change skips parsing of essential fields from such null objects.

@gsaluja9 gsaluja9 requested a review from drewaogle January 12, 2026 19:30
Copy link
Copy Markdown
Contributor

@drewaogle drewaogle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be worth throwing an exception? But looks good.

@gsaluja9 gsaluja9 merged commit e4297a3 into develop Jan 12, 2026
2 checks passed
@gsaluja9 gsaluja9 deleted the handle_optional_items branch January 12, 2026 21:10
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 this pull request may close these issues.

2 participants