T3-SingleSource Layer name fix
This commit is contained in:
@@ -29,16 +29,21 @@ namespace WebAPI.dataProcessors
|
|||||||
{
|
{
|
||||||
int year = int.Parse(processWorker?.Records?.SingleOrDefault(x => x.Code == "Year")?.Desc1!);
|
int year = int.Parse(processWorker?.Records?.SingleOrDefault(x => x.Code == "Year")?.Desc1!);
|
||||||
int month = int.Parse(processWorker?.Records?.SingleOrDefault(x => x.Code == "Month")?.Desc1!);
|
int month = int.Parse(processWorker?.Records?.SingleOrDefault(x => x.Code == "Month")?.Desc1!);
|
||||||
string? source = processWorker?.Records?.SingleOrDefault(x => x.Code == "Source")?.Desc1;
|
string? sourceLayer = processWorker?.Records?.SingleOrDefault(x => x.Code == "SourceLayer")?.Desc1;
|
||||||
if (source == null)
|
if (sourceLayer == null)
|
||||||
{
|
{
|
||||||
throw new Exception("Source record not found");
|
throw new Exception("SourceLayer record not found");
|
||||||
}
|
}
|
||||||
Layer? sourceImportWorker = db.Layers.SingleOrDefault(x => x.Name == source);
|
Layer? sourceImportWorker = db.Layers.SingleOrDefault(x => x.Name == sourceLayer);
|
||||||
if (sourceImportWorker == null)
|
if (sourceImportWorker == null)
|
||||||
{
|
{
|
||||||
throw new Exception("SourceImportWorkerL layer not found");
|
throw new Exception("SourceImportWorkerL layer not found");
|
||||||
}
|
}
|
||||||
|
string? source= processWorker?.Records?.SingleOrDefault(x => x.Code == "Source")?.Desc1;
|
||||||
|
if (sourceLayer == null)
|
||||||
|
{
|
||||||
|
throw new Exception("Source record not found");
|
||||||
|
}
|
||||||
|
|
||||||
Layer? processedLayer = db.Layers
|
Layer? processedLayer = db.Layers
|
||||||
.Where(x => x.ParentId == processWorker!.Id)
|
.Where(x => x.ParentId == processWorker!.Id)
|
||||||
|
|||||||
Reference in New Issue
Block a user