This commit is contained in:
2021-01-15 20:53:48 +00:00
parent 8fa01c9638
commit 9ee1a68b84

View File

@@ -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;