findParentJob will now return the original object if it is a job rather than None

This commit is contained in:
sliptonic
2024-04-20 09:15:06 -05:00
parent ede6c811fd
commit 7c3ca87e4a

View File

@@ -401,6 +401,9 @@ def findToolController(obj, proxy, name=None):
def findParentJob(obj):
"""retrieves a parent job object for an operation or other Path object"""
Path.Log.track()
if hasattr(obj, "Proxy") and isinstance(obj.Proxy, PathJob.ObjectJob):
return obj
for i in obj.InList:
if hasattr(i, "Proxy") and isinstance(i.Proxy, PathJob.ObjectJob):
return i