Ticket #3146: unicode_strftime_fix.diff

File unicode_strftime_fix.diff, 479 bytes (added by deepak <deep.thukral@…>, 17 years ago)
  • __init__.py

     
    537537
    538538    def get_db_prep_save(self, value):
    539539        # Casts dates into string format for entry into database.
    540         if value is not None:
     540        if value is not None and hasattr(value, 'strftime'):
    541541            value = value.strftime('%Y-%m-%d')
    542542        return Field.get_db_prep_save(self, value)
    543543
Back to Top