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
+8 -1
View File
@@ -36,12 +36,15 @@
<m:field>p.svc_operation_cfs_param</m:field>
<m:field>p.label</m:field>
<m:field>p.data_type</m:field>
<m:field formatter=#function(x){return listToArray(x);}# type="list">p.value_list</m:field>
<m:field formatter=#(x)=>((isArray(x) OR isEmpty(x))? x : listToArray(x))#>p.value_list</m:field>
<m:field>p.ref_svc_id</m:field>
<m:field formatter=#request.castToBool#>p.is_required</m:field>
<m:field>p.default_value</m:field><!--- can be overridden bu default_compute --->
<m:field>p.default_compute</m:field>
<m:field>p.func</m:field>
<m:field>p.expression</m:field>
<m:field>p.state_path</m:field>
<m:field>p.nested_ref</m:field>
<m:field>p.regex</m:field>
<m:field>p.unique_scope</m:field>
<m:field>p.maxlength</m:field>
@@ -82,6 +85,10 @@
<cfset "out.svcOperation.cfsParams"=[]/>
<cfloop query=#local.qCfsParam#>
<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>
<cfset arrayAppend(out.svcOperation.cfsParams, this.helper.appendRecord(structNew("linked"), "", local.cfsParamMap, local.qCfsParam, this.helper.snake2camel))/>
</cfloop>