fields: do not allow adding computed data field to workflow forms (#54683)

This commit is contained in:
Frédéric Péters 2021-06-09 09:29:05 +02:00
parent 92c51f43f3
commit 2056255db0
1 changed files with 3 additions and 2 deletions

View File

@ -3476,8 +3476,9 @@ def get_field_options(blacklisted_types):
non_widgets.append((klass.key, klass.description, klass.key))
options = widgets + [('', '', '')] + non_widgets
# add computed field in its own "section"
options.extend([('', '', ''), (ComputedField.key, ComputedField.description, ComputedField.key)])
if 'computed' not in blacklisted_types:
# add computed field in its own "section"
options.extend([('', '', ''), (ComputedField.key, ComputedField.description, ComputedField.key)])
if get_publisher().has_site_option('fields-blocks') and (
not blacklisted_types or 'blocks' not in blacklisted_types