Skip to content

Commit

Permalink
Merge branch 'staging' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed Oct 10, 2024
2 parents 8cc6465 + 5aae89b commit 82487cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/engine/src/templating/TemplateMapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,17 @@ def map(
# map target object
new_obj = map_target_class(**tmp_obj)

# Now update all of the properties to the map target object from the tmp
# Now update all of the properties to the map target object from the new
# object.
# NOTE this allows us to return the exact same object that was passed as
# and argument but with the modifications, there by maintaining the
# and argument but with the modifications, thereby maintaining the
# objects identity.
for attr in new_obj.dict().keys():
if attr == "tasks":
continue

updated_value = getattr(new_obj, attr)
if getattr(map_target, attr) != updated_value:
if getattr(map_target, attr, None) != updated_value:
setattr(map_target, attr, updated_value)

return map_target
Expand Down

0 comments on commit 82487cb

Please sign in to comment.