Ticket #6686: patch.diff

File patch.diff, 605 bytes (added by dmartin@…, 16 years ago)
  • django/db/backends/util.py

     
    4646###############################################
    4747
    4848def typecast_date(s):
    49     return s and datetime.date(*map(int, s.split('-'))) or None # returns None if s is null
     49    try:
     50        return s and datetime.date(*map(int, s.split('-')))
     51    except:
     52        return None # returns None if s is null
    5053
    5154def typecast_time(s): # does NOT store time zone information
    5255    if not s: return None
Back to Top