fix: wrap collected values in __ep_vars_combined for URL substitution
substituteUrlVars requires flat key-value pairs under __ep_vars_combined;
passing collected directly as meta skipped substitution since values are
strings not arrays, so {finca_id} was never replaced in the lotes URL.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
eed8116c66
commit
1114c52df4
@@ -638,7 +638,7 @@ class NormalBot
|
||||
if ($type === 'select') {
|
||||
$vf = $field['value_field'] ?? 'id';
|
||||
$lf = $field['label_field'] ?? 'label';
|
||||
$items = self::fetchDynamicList($field['source_endpoint_key'] ?? '', $company, $cap['collected'] ?? []);
|
||||
$items = self::fetchDynamicList($field['source_endpoint_key'] ?? '', $company, ['__ep_vars_combined' => $cap['collected'] ?? []]);
|
||||
if (!empty($items)) {
|
||||
if ($ctxId > 0) {
|
||||
$cap['__selects'][$field['key']] = array_column($items, $lf, $vf);
|
||||
|
||||
Reference in New Issue
Block a user