Fixed the issue when we are logging errors in the logs incorrectly

This commit is contained in:
Jamie 2019-08-27 21:49:26 +01:00 committed by GitHub
commit f772a60bc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,7 +56,9 @@ namespace Ombi.Schedule.Jobs.Radarr
var movieIds = new List<RadarrCache>(); var movieIds = new List<RadarrCache>();
foreach (var m in movies) foreach (var m in movies)
{ {
if (m.tmdbId > 0 && m.monitored) if(m.monitored)
{
if (m.tmdbId > 0)
{ {
movieIds.Add(new RadarrCache movieIds.Add(new RadarrCache
{ {
@ -69,6 +71,7 @@ namespace Ombi.Schedule.Jobs.Radarr
Logger.LogError("TMDBId is not > 0 for movie {0}", m.title); Logger.LogError("TMDBId is not > 0 for movie {0}", m.title);
} }
} }
}
using (var tran = await _ctx.Database.BeginTransactionAsync()) using (var tran = await _ctx.Database.BeginTransactionAsync())
{ {