Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#20672 closed Bug (needsinfo)

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():
-> err = self.errors
-> self.full_clean()
-> self._errors.append(form.errors)
-> self.full_clean()
-> if self.empty_permitted and not self.has_changed():
-> return bool(self.changed_data)
-> if field.widget._has_changed(initial_value, data_value):
-> initial = self.decompress(initial)
-> value = to_current_timezone(value)
-> if settings.USE_TZ and value is not None and timezone.is_aware(value):

Change History (3)

comment:1 Changed 5 years ago by Riley Strong <eponymous@…>

Type: UncategorizedBug

comment:2 Changed 5 years ago by Tim Graham

Resolution: needsinfo
Status: newclosed

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?

comment:3 Changed 5 years ago by Tim Graham

Cc: timograham@… added
Note: See TracTickets for help on using tickets.
Back to Top