214 empty lists fixes

This commit is contained in:
2026-03-14 14:08:21 +03:00
parent aff2416baa
commit 4f624b06c4
8 changed files with 73 additions and 29 deletions
+18 -7
View File
@@ -141,9 +141,15 @@
<m:field>sop.label</m:field>
<m:field>sop.data_type</m:field>
<m:field>null as data_descriptor</m:field>
<m:field formatter=#function(x){return listToArray(x);}# type="list">sop.value_list</m:field>
<m:field formatter=#(x)=>((isArray(x) OR isEmpty(x))? x : listToArray(x))#>sop.value_list</m:field>
<m:field>sop.ref_svc_id</m:field>
<m:field>sop.func</m:field>
<m:field>sop.nested_ref</m:field>
<m:field>sop.state_path</m:field>
<m:field>sop.expression</m:field>
<m:field>sop.depends_on_cfs_params</m:field>
<m:field formatter=#request.castToBool#>sop.is_required</m:field>
<m:field>sop.default_value</m:field>
<m:field>sop.regex</m:field>
@@ -155,13 +161,12 @@
<m:field>sop.descr</m:field>
<m:field>sop.man</m:field>
<m:field>sop.sort</m:field>
<m:field>iop.note</m:field>
<m:field>sop.nested_ref</m:field>
<m:field>iop.note</m:field>
<m:field>sop.config::text as config</m:field>
<m:field>null as nested_ref_data</m:field><!--- placeholder for future data --->
<m:field>sop.state_path</m:field>
<m:field>sop.depends_on_cfs_params</m:field>
<m:field>sop.expression</m:field>
<m:field formatter=#request.castToBool#>sop.is_sensitive</m:field>
</m:field_set>
from svc_operation_cfs_param sop
@@ -219,7 +224,13 @@
}
)
/>
</cfif>
</cfif>
<cfif (len(local.qCfsParam.func) OR len(local.qCfsParam.expression) OR len(local.qCfsParam.state_path) OR len(local.qCfsParam.nested_ref))
AND len(local.qCfsParam.value_list) EQ 0>
<cfset local.qCfsParam.value_list = []/>
</cfif>
<!--- *** боюсь, где-то тут нужно будет делать вычисления субпараметров --->
<cfif data_type EQ "map" OR data_type EQ "map-fixed" OR data_type EQ "array-map-fixed">
<cfinvoke component="instance_operation_cfs_param" method="processMap" qParam=#local.qCfsParam#/>