Tested and fixed some things

This commit is contained in:
Mark van der Wal 2020-07-07 21:45:39 +02:00
parent 65a0398444
commit bbf2db0040

View File

@ -118,7 +118,12 @@ namespace FarmmapsNbs
var uptakeMapItem =
await _nitrogenService.CalculateUptakeMap(cropfieldItem, geotiffItem, plantingDate,
measurementDate, input.InputVariable);
if (uptakeMapItem == null)
{
_logger.LogError("Something went wrong with creating the uptakeMap");
return;
}
_logger.LogInformation("Downloading uptake map");
await _farmmapsApiService.DownloadItemAsync(uptakeMapItem.Code,
Path.Combine(DownloadFolder, $"{input.OutputFileName}.uptake.zip"));
@ -129,6 +134,11 @@ namespace FarmmapsNbs
measurementDate,
input.InputVariable, targetNData.TargetN);
if (applicationMapItem == null)
{
_logger.LogError("Something went wrong with creating the applicationMap");
return;
}
_logger.LogInformation("Downloading application map");
await _farmmapsApiService.DownloadItemAsync(applicationMapItem.Code,
Path.Combine(DownloadFolder, $"{input.OutputFileName}.application.zip"));