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;