{% if id_prefix+'_oid' in form_data %} {% set selected_id = form_data[id_prefix+'_oid'] %} {% elif data is not none and "object_id" in data %} {% set selected_id = data.object_id | string %} {% else %} {% set selected_id = None %} {% endif %} {% if schema_action_ids is none and schema_action_type_ids is none %} {% set valid_action_ids = none %} {% else %} {% set valid_action_ids = [] %} {% for action_id in action_type_id_by_action_id %} {% if schema_action_ids is none or action_id in schema_action_ids %} {% if schema_action_type_ids is none or action_type_id_by_action_id[action_id] in schema_action_type_ids %} {{ valid_action_ids.append(action_id) or '' }} {% endif %} {% endif %} {% endfor %} {% endif %}
{% if valid_action_ids is none or valid_action_ids | length > 1 %} {% endif %}