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 month = int.Parse(processWorker?.Records?.SingleOrDefault(x => x.Code == "Month")?.Desc1!);
|
||||
string? source = processWorker?.Records?.SingleOrDefault(x => x.Code == "Source")?.Desc1;
|
||||
if (source == null)
|
||||
string? sourceLayer = processWorker?.Records?.SingleOrDefault(x => x.Code == "SourceLayer")?.Desc1;
|
||||
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)
|
||||
{
|
||||
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
|
||||
.Where(x => x.ParentId == processWorker!.Id)
|
||||
|
||||
Reference in New Issue
Block a user