Skip to content

Commit

Permalink
Update item.py
Browse files Browse the repository at this point in the history
  • Loading branch information
alukach committed Jul 21, 2022
1 parent 2c14a00 commit 5d4fdd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stac_pydantic/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ItemProperties(StacCommonMetadata):

@validator("datetime")
def validate_datetime(cls, v: Union[dt, str, None], values: Dict[str, Any]) -> dt:
if v in ("null", None):
if v is None:
if not values["start_datetime"] and not values["end_datetime"]:
raise ValueError(
"start_datetime and end_datetime must be specified when datetime is null"
Expand Down

0 comments on commit 5d4fdd4

Please sign in to comment.