Merge branch 'ent-6602-AXA-Recursividad-de-grupos-no-funciona-en-operaciones-masivas' into 'develop'

fix recursivity check

See merge request artica/pandorafms!3711
This commit is contained in:
Daniel Rodriguez 2021-03-01 10:57:45 +00:00
commit 72ecb53412
1 changed files with 13 additions and 1 deletions

View File

@ -35,11 +35,23 @@
$("option[value!=0]", $select).remove ();
if (! config.callbackBefore (this))
return;
if (typeof config.recursion === "function") {
// Perform this for those cases where recursion parameter is obtained through a function that returns a variable that is set in the lexical environment where this constructor is called.
var recursion_value = config.recursion();
if (typeof recursion_value === "boolean") {
recursion_value = recursion_value ? 1 : 0;
}
} else {
var recursion_value = config.recursion;
}
var opts = {
"page" : "godmode/groups/group_list",
"get_group_agents" : 1,
"id_group" : this.value,
"recursion" : config.recursion,
"recursion" : recursion_value,
"filter_agents_json" : config.filter_agents_json,
"disabled" : (typeof config.disabled === "function")
? (config.disabled())