Do not return bool

This commit is contained in:
Roy Nieterau 2024-04-11 16:24:40 +02:00
parent 4b1b54732e
commit 9690748d99

View file

@ -948,11 +948,6 @@ def replace_instance_in_context(
the publisher to correctly detect and transfer the logs relevant for the
instance.
Returns:
bool: Whether the source instance was replaced or the destination
instance was only added because source instance did not exist
in the context.
"""
# Transfer the pyblish.api.Instance id
destination_instance._id = source_instance.id
@ -966,8 +961,7 @@ def replace_instance_in_context(
for idx, instance in enumerate(context):
if source_instance is instance:
context[idx] = destination_instance
return True
return
# Source was not found
context.append(destination_instance)
return False