1. Matthew Schinckel
  2. django-timedelta-field

Commits

Matthew Schinckel  committed 451e07f Merge

Merged in kosz85/django-timedelta-field/strip-when-parse (pull request #14)

parse should deal with additional spaces - adding strip

  • Participants
  • Parent commits 7048edf, 9defd38
  • Branches default

Comments (0)

Files changed (1)

File timedelta/helpers.py

View file
  • Ignore whitespace
     >>> parse(nice_repr(zero, 'short'))
     datetime.timedelta(0)
     """
+    string = string.strip()
+
     if string == "":
         raise TypeError("'%s' is not a valid time interval" % string)
     # This is the format we get from sometimes Postgres, sqlite,