mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
Log an error and continue when a related object is not found
This commit is contained in:
parent
66bc947adb
commit
57aff6394c
@ -286,7 +286,9 @@ class ApiV2(base.Base):
|
||||
def _assign_related_assets(self, assets):
|
||||
for asset in assets:
|
||||
_page = self._get_by_natural_key(asset['natural_key'])
|
||||
# FIXME: deal with `_page is None` case
|
||||
if _page is None:
|
||||
log.error("Related object with natural key not found: %r", asset['natural_key'])
|
||||
continue
|
||||
for name, S in asset.get('related', {}).items():
|
||||
if not S:
|
||||
continue
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user