Skip to content

Commit

Permalink
Fix error with missing data in dict
Browse files Browse the repository at this point in the history
  • Loading branch information
lpconsulting321 committed Nov 8, 2024
1 parent f158d75 commit 8d7609c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion infrahub_sync/adapters/slurpitsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def slurpit_obj_to_diffsync(
f" The available models are {self.store.get_all_model_names()}"
)
if not field_is_list:
if node := obj[field.mapping]:
if node := obj.get(field.mapping):
matching_nodes = []
node_id = self.build_mapping(reference=field.reference, obj=obj)
matching_nodes = [item for item in nodes if str(item) == node_id]
Expand Down

0 comments on commit 8d7609c

Please sign in to comment.