Skip to content

Commit dddd710

Browse files
authored
apply datetime converter in ItemCollection endpoint model (#667)
* apply datetime converter in ItemCollection endpoint model * update changelog
1 parent 2e14348 commit dddd710

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
### Fixed
6+
7+
* Apply datetime converter in ItemCollection endpoint model ([#667](https://github.com/stac-utils/stac-fastapi/pull/667))
8+
59
## [2.5.2] - 2024-04-19
610

711
### Fixed

stac_fastapi/api/stac_fastapi/api/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
BaseSearchGetRequest,
1717
BaseSearchPostRequest,
1818
str2bbox,
19+
str_to_interval,
1920
)
2021

2122

@@ -127,7 +128,7 @@ class ItemCollectionUri(CollectionUri):
127128

128129
limit: int = attr.ib(default=10)
129130
bbox: Optional[BBox] = attr.ib(default=None, converter=str2bbox)
130-
datetime: Optional[DateTimeType] = attr.ib(default=None)
131+
datetime: Optional[DateTimeType] = attr.ib(default=None, converter=str_to_interval)
131132

132133

133134
class POSTTokenPagination(BaseModel):

0 commit comments

Comments
 (0)