Fixed crash/error #865

This commit is contained in:
tidusjar 2017-10-03 22:52:41 +01:00
commit 8695383abf

View file

@ -44,9 +44,16 @@ namespace Ombi.Schedule.Jobs.Ombi
}
public async Task<bool> UpdateAvailable(string branch, string currentVersion)
{
var updates = await OmbiService.GetUpdates(branch);
var serverVersion = updates.UpdateVersionString;
return !serverVersion.Equals(currentVersion, StringComparison.CurrentCultureIgnoreCase);
try
{
var updates = await OmbiService.GetUpdates(branch);
var serverVersion = updates.UpdateVersionString;
return !serverVersion.Equals(currentVersion, StringComparison.CurrentCultureIgnoreCase);
}
catch (Exception e)
{
Logger.LogError(e, "Attempted to check if there was an update");
}
}
public async Task Update(PerformContext c)