Projet

Général

Profil

0001-fields-do-not-allow-adding-computed-data-field-to-wo.patch

Frédéric Péters, 09 juin 2021 09:29

Télécharger (1,15 ko)

Voir les différences:

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

 wcs/fields.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
wcs/fields.py
3476 3476
            non_widgets.append((klass.key, klass.description, klass.key))
3477 3477
    options = widgets + [('', '—', '')] + non_widgets
3478 3478

  
3479
    # add computed field in its own "section"
3480
    options.extend([('', '—', ''), (ComputedField.key, ComputedField.description, ComputedField.key)])
3479
    if 'computed' not in blacklisted_types:
3480
        # add computed field in its own "section"
3481
        options.extend([('', '—', ''), (ComputedField.key, ComputedField.description, ComputedField.key)])
3481 3482

  
3482 3483
    if get_publisher().has_site_option('fields-blocks') and (
3483 3484
        not blacklisted_types or 'blocks' not in blacklisted_types
3484
-