-
Notifications
You must be signed in to change notification settings - Fork 25
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
error with null datetime #77
Comments
It says here that null is allowed for datetime: https://github.com/radiantearth/stac-spec/blob/v1.0.0-beta.2/item-spec/item-spec.md |
I tried this |
I think maybe we can update the ItemProperties.datetime type to 'Optional[datetime] = Field(...)' The '...' indicates the field is required, so a user has to explicitely pass 'None'. I don't have the pydantic docs in front of me (I'm on mobile atm) but I think this is how it works. |
Do you think that in |
A JSON |
As mentioned in stac-utils#77, we should permit a None value for datetime property under certain circumstances.
I do believe that we should instead be expecting |
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:stac-pydantic/stac_pydantic/item.py
Line 23 in c2db77c
The text was updated successfully, but these errors were encountered: