diff --git a/src/Mod/Path/PathScripts/PathJob.py b/src/Mod/Path/PathScripts/PathJob.py index 37d5bfcd99..322db6def5 100644 --- a/src/Mod/Path/PathScripts/PathJob.py +++ b/src/Mod/Path/PathScripts/PathJob.py @@ -235,14 +235,15 @@ class ObjectJob: def allOperations(self): ops = [] def collectBaseOps(op): - if op.TypeId == 'Path::FeaturePython': - ops.append(op) - if hasattr(op, 'Base'): - collectBaseOps(op.Base) - if op.TypeId == 'Path::FeatureCompoundPython': - ops.append(op) - for sub in op.Group: - collectBaseOps(sub) + if hasattr(op, 'TypeId'): + if op.TypeId == 'Path::FeaturePython': + ops.append(op) + if hasattr(op, 'Base'): + collectBaseOps(op.Base) + if op.TypeId == 'Path::FeatureCompoundPython': + ops.append(op) + for sub in op.Group: + collectBaseOps(sub) for op in self.obj.Operations.Group: collectBaseOps(op) return ops