Skip to content

More options around exclude_if_none #233

@venkat-raman-wday

Description

@venkat-raman-wday

As noted in the document, the exclude_if_none is based off of Falsey-ness. While this might apply to most property types, it also doesn't apply in certain conditions to certain properties. For example, for an IntegerProperty, setting exclude_if_none=True doesn't work for cases where default=0 which is a valid value for this property and ends up being wrong. When generating a JSON based off of default values and validating against a schema, these cases make a big difference. There probably are other such scenarios. Any workarounds for this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions