Commits

Matt Chaput  committed dfe1d87

Relaxed type checking of string values passed to DATETIME.

  • Participants
  • Parent commits 5a16dd4

Comments (0)

Files changed (1)

File src/whoosh/fields.py

     def to_text(self, x, shift=0):
         from whoosh.support.times import floor
         try:
-            if isinstance(x, text_type):
+            if isinstance(x, string_type):
                 # for indexing, support same strings as for query parsing
                 x = self._parse_datestring(x)
                 x = floor(x) # this makes most sense (unspecified = lowest possible value)
             return query.error_query(e)
         
         return query.Term(fieldname, text, boost=boost)
-    
+
+
 
 class STORED(FieldType):
     """Configured field type for fields you want to store but not index.