Support multiple agent types filtering

This commit is contained in:
Haiping Chen 2024-02-23 09:15:10 -06:00
parent ad0e35157d
commit 5f7a8e5480
2 changed files with 4 additions and 2 deletions

View file

@ -352,7 +352,8 @@ namespace BotSharp.Core.Repository
if (filter.Type != null)
{
query = query.Where(x => x.Type == filter.Type);
var types = filter.Type.Split(",");
query = query.Where(x => types.Contains(x.Type));
}
if (filter.IsPublic.HasValue)

View file

@ -284,7 +284,8 @@ public partial class MongoRepository
if (filter.Type != null)
{
filters.Add(builder.Eq(x => x.Type, filter.Type));
var types = filter.Type.Split(",");
filters.Add(builder.In(x => x.Type, types));
}
if (filter.IsPublic.HasValue)