wagtail-deprecated / wagtail-react-streamfield

Powerful field for inserting multiple blocks with nesting. (NO LONGER MAINTAINED - See Wagtail 2.13 Release Notes)
https://wagtail.github.io/react-streamfield/public/
BSD 3-Clause "New" or "Revised" License
74 stars 23 forks source link

Cannot serialise default date value #40

Closed kevinhowbrook closed 5 years ago

kevinhowbrook commented 5 years ago

errorObject of type builtin_function_or_method is not JSON serializable is thrown when defining a block with a default date value e.g:

    start_time = blocks.DateTimeBlock(required=False, default=datetime.now)
BertrandBordage commented 5 years ago

Fixed in Wagtail by https://github.com/wagtail/wagtail/pull/4942/commits/0cb560980402342e52cdb8d9457e6d63a39e988b. I will backport this change to wagtail-react-streamfield soon.

kevinhowbrook commented 5 years ago

Thanks @BertrandBordage

BertrandBordage commented 5 years ago

Fixed by c040db0395a0356b51d2303ddb8b376f1ac14877.