From b2f0fc68acaac3dc0b19fc2b48caee816a4a3b0a Mon Sep 17 00:00:00 2001 From: Joris Tirado Date: Wed, 30 May 2018 11:29:05 -0700 Subject: [PATCH] UI-3096: Only list groups created with SmartPBX (#61) When creating groups on SmartPBX, the app automatically generates baseGroup/userGroup callflows depending on which users are part of the group. On the other end, the Callflows app only creates a group without any callflow. Since SmartPBX is listing all groups, an error was raised when trying to view the details of group created through the Callflows app since an associated callflow does not exist. --- submodules/groups/groups.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/submodules/groups/groups.js b/submodules/groups/groups.js index 21a8a00..5d01318 100644 --- a/submodules/groups/groups.js +++ b/submodules/groups/groups.js @@ -118,7 +118,8 @@ define(function(require) { }); _.each(mapGroups, function(group) { - arrayGroups.push(group); + // Only list groups created with SmartPBX (e.g. with an associated baseGroup callflow) + group.extra.hasOwnProperty('baseCallflowId') && arrayGroups.push(group); }); arrayGroups.sort(function(a, b) {