Ticket #3156: datetimefield.2.patch

File datetimefield.2.patch, 704 bytes (added by asvanberg@…, 11 years ago)

oops, qrong order in patch. this should be correct.

  • django/db/models/fields/__init__.py

    old new  
    486486                    raise validators.ValidationError, gettext('Enter a valid date/time in YYYY-MM-DD HH:MM format.')
    488488    def pre_save(self, model_instance, add):
    489         value = super(DateField, self).pre_save(model_instance, add)
     489        value = super(DateTimeField, self).pre_save(model_instance, add)
    490490        if value is not None:
    491491            # MySQL will throw a warning if microseconds are given, because it
    492492            # doesn't support microseconds.
Back to Top