diff --git a/Site5/Automation/Json-SearchPeoplePattern.aspx.cs b/Site5/Automation/Json-SearchPeoplePattern.aspx.cs index 21db0a28..6f7056df 100644 --- a/Site5/Automation/Json-SearchPeoplePattern.aspx.cs +++ b/Site5/Automation/Json-SearchPeoplePattern.aspx.cs @@ -23,6 +23,11 @@ namespace Swarmops.Frontend.Automation matches = Authorization.FilterPeopleToMatchAuthority(matches, CurrentUser.GetAuthority()); + if (matches == null) + { + matches = new People(); + } + if (matches.Count > 10) { matches.RemoveRange(10, matches.Count - 10); diff --git a/Site5/Controls/v5/Swarm/ComboPeople.ascx b/Site5/Controls/v5/Swarm/ComboPeople.ascx index ab4957a4..3ddd80c1 100644 --- a/Site5/Controls/v5/Swarm/ComboPeople.ascx +++ b/Site5/Controls/v5/Swarm/ComboPeople.ascx @@ -61,7 +61,8 @@ var autoCompleteLoader = function(param,success,error){ var q = param.q || ''; if (q.length < 3) { - success (null); + success (new Array()); + return false; } $.ajax({ url: '/Automation/Json-SearchPeoplePattern.aspx',