Skip to content

error with null datetime #77

@jonhealy1

Description

@jonhealy1

I was looking at upgrading stac-pydantic and I noticed that it does not like: "datetime": null in a stac item. I got this error message running pytest as well. I think this line needs to be changed:

datetime: Union[dt, str] = Field(..., alias="datetime")

$ stac-pydantic validate-item https://raw.githubusercontent.com/radiantearth/stac-spec/master/examples/collectionless-item.json

1 validation error for CustomStacItem
properties -> datetime
  none is not an allowed value (type=type_error.none.not_allowed)
  • To get this error you need to change the version to '1.0.0-rc.4' in version.py

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions