Cannot save InlineFormSet with SplitDateTimeWidget
Reported by: |
eponymous@… |
Owned by: |
nobody |
Component:
|
Forms
|
Version:
|
1.5
|
Severity:
|
Normal
|
Keywords:
|
|
Cc:
|
timograham@…
|
Triage Stage:
|
Unreviewed
|
Has patch:
|
no
|
Needs documentation:
|
no
|
Needs tests:
|
no
|
Patch needs improvement:
|
no
|
Easy pickings:
|
no
|
UI/UX:
|
no
|
'unicode' object has no attribute 'tzinfo'
When submitting, value = u'2013-06-28 01:19:49.544351'
However, when loading the page (GET), value = datetime.datetime(2013, 6, 28, 6, 22, 29, 514936, tzinfo=<UTC>)
Call stack:
-> if formset.is_valid():
~/project/lib/django/forms/formsets.py(277)is_valid()
-> err = self.errors
~/project/lib/django/forms/formsets.py(259)errors()
-> self.full_clean()
~/project/lib/django/forms/formsets.py(297)full_clean()
-> self._errors.append(form.errors)
~/project/lib/django/forms/forms.py(117)_get_errors()
-> self.full_clean()
~/project/lib/django/forms/forms.py(270)full_clean()
-> if self.empty_permitted and not self.has_changed():
~/project/lib/django/forms/forms.py(323)has_changed()
-> return bool(self.changed_data)
~/project/lib/django/forms/forms.py(344)_get_changed_data()
-> if field.widget._has_changed(initial_value, data_value):
~/project/lib/django/forms/widgets.py(852)_has_changed()
-> initial = self.decompress(initial)
~/project/lib/django/forms/widgets.py(901)decompress()
-> value = to_current_timezone(value)
~/project/lib/django/forms/util.py(95)to_current_timezone()
-> if settings.USE_TZ and value is not None and timezone.is_aware(value):
Change History
(3)
Type: |
Uncategorized → Bug
|
Resolution: |
→ needsinfo
|
Status: |
new → closed
|
I tried to reproduce this using an inline in the admin (using both master and 1.5.x), but couldn't. Could you provide steps to reproduce?