B2022-049: Copy/paste of enhanced procedure and bad links between source and enhanced
This commit is contained in:
@@ -1474,22 +1474,26 @@ namespace VEPROMS.CSLA.Library
|
||||
// Find hls in enhanced in order to get its notes to set their config to
|
||||
// point back to the new source's note itemid.
|
||||
ItemInfo enhCtItem = null;
|
||||
while (enhCtItem == null && enhIndxCt < enhHls.Cautions.Count)
|
||||
// B2022-049: Copy/paste of enhanced procedure and bad links between source and enhanced. Null reference check
|
||||
if (enhHls.Cautions != null)
|
||||
{
|
||||
ItemInfo enhTstCaut = enhHls.Cautions[enhIndxCt];
|
||||
StepConfig enhTstCautCfg = enhTstCaut.MyConfig as StepConfig;
|
||||
if (enhTstCautCfg.MyEnhancedDocuments.Count > 0)
|
||||
while (enhCtItem == null && enhIndxCt < enhHls.Cautions.Count)
|
||||
{
|
||||
foreach (EnhancedDocument enhCt in enhTstCaut.GetMyEnhancedDocuments())
|
||||
ItemInfo enhTstCaut = enhHls.Cautions[enhIndxCt];
|
||||
StepConfig enhTstCautCfg = enhTstCaut.MyConfig as StepConfig;
|
||||
if (enhTstCautCfg.MyEnhancedDocuments.Count > 0)
|
||||
{
|
||||
if (enhCt.Type == 0)
|
||||
foreach (EnhancedDocument enhCt in enhTstCaut.GetMyEnhancedDocuments())
|
||||
{
|
||||
enhCtItem = enhTstCaut;
|
||||
break;
|
||||
if (enhCt.Type == 0)
|
||||
{
|
||||
enhCtItem = enhTstCaut;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (enhCtItem == null) enhIndxCt++;
|
||||
}
|
||||
if (enhCtItem == null) enhIndxCt++;
|
||||
}
|
||||
if (enhCtItem != null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user