Code

Ticket #3301: 3301.diff

File 3301.diff, 675 bytes (added by Gary Wilson <gary.wilson@…>, 7 years ago)
Line 
1=== modified file 'django/db/models/fields/__init__.py'
2--- django/db/models/fields/__init__.py 2007-01-31 05:16:07 +0000
3+++ django/db/models/fields/__init__.py 2007-01-31 05:20:54 +0000
4@@ -486,7 +486,7 @@
5                     raise validators.ValidationError, gettext('Enter a valid date/time in YYYY-MM-DD HH:MM format.')
6 
7     def pre_save(self, model_instance, add):
8-        value = super(DateField, self).pre_save(model_instance, add)
9+        value = super(DateTimeField, self).pre_save(model_instance, add)
10         if value is not None:
11             # MySQL will throw a warning if microseconds are given, because it
12             # doesn't support microseconds.
13