

def _fix_value(self, value):
    if (not isinstance(value, KillChainPhase)):
        return super(KillChainPhasesReference, self)._fix_value(value)
    if value.phase_id:
        return KillChainPhaseReference(phase_id=value.phase_id)
    raise ValueError('KillChainPhase must have a phase_id.')

dataset/ETHPy150Open STIXProject/python-stix/stix/common/kill_chains/__init__.py KillChainPhasesReference._fix_value/original