Fixed: Rename movie not working (#1970) (Fixes #1908)

This commit is contained in:
Leonardo Galli
2017-08-20 22:12:02 +02:00
committed by GitHub
parent 4d5a5ed2c1
commit 685c5daf36
6 changed files with 96 additions and 30 deletions

View File

@@ -83,11 +83,12 @@ namespace NzbDrone.Core.Datastore
{
var idList = ids.ToList();
var query = string.Format("Id IN ({0})", string.Join(",", idList));
var result = Query.Where(query).ToList();
var result = Query.Where(m => m.Id.In(idList)).ToList();
//var result = Query.Where(query).ToList();
if (result.Count != idList.Count())
{
throw new ApplicationException("Expected query to return {0} rows but returned {1}".Inject(idList.Count(), result.Count));
throw new ApplicationException("Expected query to return {0} rows but returned {1}.".Inject(idList.Count(), result.Count));
}
return result;