B2020-009 Copy/Paste procedures, check for background step editor sections (being copied) that are empty (contains no steps) and skip the process that tries to create links for these (non-existing) steps

This commit is contained in:
John Jenko 2020-01-21 17:48:16 +00:00
parent c81c98ab80
commit 2bc4a8d105

View File

@ -1469,9 +1469,13 @@ namespace VEPROMS.CSLA.Library
if (ed.Type == enhType)
{
newEnhSectionInfo = ItemInfo.Get(ed.ItemID);
// B2020-009 if section does not have steps (empty step section) then skip it.
if (newEnhSectionInfo.Steps != null)
{
StepConfig cfg = newEnhSectionInfo.Steps[0].MyConfig as StepConfig;
if (cfg.MyEnhancedDocuments.Count > 0) enhStep = newEnhSectionInfo.Steps[0];
else enhStep = GetNextEnhancedStep(newEnhSectionInfo.Steps[0]);
}
break;
}
}