Skip to content

Commit

Permalink
fix: use DateHandler instead of StringHandler for DateObjectDateField
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Feb 22, 2024
1 parent 0fe75d8 commit fe0a84f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion viecpro_typesense/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Config:

class DateObjectDateField(Field):
class Config:
handler = StringHandler
handler = DateHandler
options = O(type="string")


Expand Down
4 changes: 4 additions & 0 deletions viecpro_typesense/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class StringHandler(Handler):
def func(x): return fixstring(x) if x else ""


class DateHandler(Handler):
def func(x): return str(x) if x else ""


RelatedIDHandler = StringHandler


Expand Down

0 comments on commit fe0a84f

Please sign in to comment.