B2020-141 This fixes logic added for Barakah which allowed user to change the procedure number of a linked Enhanced procedure. Needed to Add a NULL reference check when a deleted EOP step that once was linked to an Enhanced Step is restored.

This commit is contained in:
John Jenko 2020-10-14 14:02:28 +00:00
parent 314f695990
commit 89a83c7064

View File

@ -637,6 +637,7 @@ namespace VEPROMS.CSLA.Library
if (ed.Type != 0) if (ed.Type != 0)
{ {
ItemInfo ii = ItemInfo.Get(ed.ItemID); ItemInfo ii = ItemInfo.Get(ed.ItemID);
if (ii == null) continue; //B2020-141 the itemID is not there because the linked Enhanced step was delete when EOP step was deleted
// C2019-045: For enhanced procedures, allow modification of number & text. A setting on the docversion (set from Properties dialog) defines whether text // C2019-045: For enhanced procedures, allow modification of number & text. A setting on the docversion (set from Properties dialog) defines whether text
// can be modified if it is an enhanced item. If it can be modified, don't do the automatic update if the 'source' text is changed. // can be modified if it is an enhanced item. If it can be modified, don't do the automatic update if the 'source' text is changed.
bool doEnhancedMods = ii.EnhAllowMod(); bool doEnhancedMods = ii.EnhAllowMod();