From 9ee1a68b844614d3e97d2b6a755a222aa955eebc Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 15 Jan 2021 20:53:48 +0000 Subject: [PATCH] --- server/AyaNova/PickList/PickListSqlBuilder.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/AyaNova/PickList/PickListSqlBuilder.cs b/server/AyaNova/PickList/PickListSqlBuilder.cs index 6f052d7e..47651ab2 100644 --- a/server/AyaNova/PickList/PickListSqlBuilder.cs +++ b/server/AyaNova/PickList/PickListSqlBuilder.cs @@ -97,11 +97,11 @@ namespace AyaNova.PickList //if there is an override to see inactive too then we just don't set the filter on active if (!IncludeInactive) { - if (preIds.Length>0) + if (preIds.Length > 0) { //pre-selected need to always appear regardless of active status //ActiveWhereFragment = $"({rowIdColumn.SqlIdColumnName} = {preId}) or ({activeColumn.SqlValueColumnName} = true)"; - ActiveWhereFragment = $"({rowIdColumn.SqlIdColumnName} in ({string.Join(",", preIds)})) or ({activeColumn.SqlValueColumnName} = true)"; + ActiveWhereFragment = $"({rowIdColumn.SqlIdColumnName} in ({string.Join(",", preIds)})) or ({activeColumn.SqlValueColumnName} = true)"; } else { @@ -291,7 +291,7 @@ namespace AyaNova.PickList { //we might have a trailing and to remove //jesus this stuff sucks, there must be a better way, it seems so fragile - if (!IncludeInactive || HasTagSpecificQuery) + if (!IncludeInactive || HasTagSpecificQuery || preIds.Length > 0) { //trailing " and " to remove sb.Length -= 5;