Commit 263dabd9 authored by Klaus Wölfel's avatar Klaus Wölfel Committed by Klaus Wölfel

[erp5_property_sheets]: set default of text_content to empty string

Before, the text content of a new text document derived portal type
suche as Notebook was None. This lead to ui problems
(displaying None in text editor) and to download the data attachment
from jio because downloadable mixin would try to get len(None)
parent 12e464cf
...@@ -47,6 +47,10 @@ ...@@ -47,6 +47,10 @@
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value> <value> <string>Standard Property</string> </value>
</item> </item>
<item>
<key> <string>property_default</string> </key>
<value> <string>python: \'\'</string> </value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
  • Could be possible to move this fix to officejs js side? for example doing some sanity checks on text_content in gadget_officejs_jio_notebook_view. Then we avoid to have this custom python code on the property and also we keep all these changes in the officejs bt only

  • The problem also exists when opening a notebook in erp5 (without officejs). If the default is not an empty string, then "None" is displayed. I think the default for text should be empty string instead of None. If we do a work around in officejs, then erp5 is not fixed.

  • @klaus does it have any impact on existing erp5 tests? Do you have a test suite with this branch to ensure it does not introduce any unexpected regression?

  • @romain the change does not have any impact on existing erp5 tests. Here is the latest test result of this branch: https://nexedijs.erp5.net/#/test_result_module/20191014-8B1C7B1E

Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment