DateTime format for DateTimeBlock is not loaded correctly
dniegel opened this issue · comments
Hi,
it seems there is a bug for DateTimeBlock (from wagtail.core.blocks), when a page containing it is edited or after the first save, saving again is resulting in a validation error:
Version: 1.0.5
Steps to reproduce:
-
Create a page with a stream field with a DateTimeBlock option
-
Choose any valid DateTime and save
-
The DateTime format should be incorrect now / trying to save again should produce a validation error.
The reason for this behaviour might be the usage of the InputJSONEncoder / DjangoJSONEncoder (in function render_with_errors) which uses isoformat().
Same here.
Fixed by b552ee9 and released in 1.0.6 :)