Skip to content

Commit

Permalink
fix: fix date object grpc conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
joein committed Apr 5, 2024
1 parent 158df75 commit 8eafdb2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion qdrant_client/conversions/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,9 @@ def convert_range(cls, model: rest.Range) -> grpc.Range:
)

@classmethod
def convert_datetime(cls, model: datetime) -> Timestamp:
def convert_datetime(cls, model: Union[datetime, date]) -> Timestamp:
if isinstance(model, date):
model = datetime.combine(model, datetime.min.time())
ts = Timestamp()
ts.FromDatetime(model)
return ts
Expand Down

0 comments on commit 8eafdb2

Please sign in to comment.