diff --git a/lib/constants.py b/lib/constants.py index af3df19d0728b2a4a0c08b8aa237dd87fbcaa45b..5187c99934e1326ab763036f4b9063153290cd8d 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -974,7 +974,7 @@ ND_OOB_PROGRAM = "oob_program" ND_SPINDLE_COUNT = "spindle_count" NDS_PARAMETER_TYPES = { - ND_OOB_PROGRAM: VTYPE_MAYBE_STRING, + ND_OOB_PROGRAM: VTYPE_STRING, ND_SPINDLE_COUNT: VTYPE_INT, } @@ -1842,7 +1842,7 @@ BEC_DEFAULTS = { } NDC_DEFAULTS = { - ND_OOB_PROGRAM: None, + ND_OOB_PROGRAM: "", ND_SPINDLE_COUNT: 1, } diff --git a/lib/objects.py b/lib/objects.py index 74526d338235373a10da51d4e353d1f1aaad01b8..a852593e463c8c4a85808f891844d7e87520bacb 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -173,6 +173,10 @@ def UpgradeNDParams(ndparams): if ndparams is None: ndparams = {} + if (constants.ND_OOB_PROGRAM in ndparams and + ndparams[constants.ND_OOB_PROGRAM] is None): + # will be reset by the line below + del ndparams[constants.ND_OOB_PROGRAM] return FillDict(constants.NDC_DEFAULTS, ndparams)