mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
PR to fix the issue of keyerror in Nios api (#49183)
* ipv4addr keyerror fix Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com> * fix review comment Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
This commit is contained in:
parent
3784abc96a
commit
40a806d156
1 changed files with 2 additions and 1 deletions
|
@ -230,7 +230,8 @@ class WapiModule(WapiBase):
|
||||||
if ib_obj_ref:
|
if ib_obj_ref:
|
||||||
if len(ib_obj_ref) > 1:
|
if len(ib_obj_ref) > 1:
|
||||||
for each in ib_obj_ref:
|
for each in ib_obj_ref:
|
||||||
if each['ipv4addr'] == proposed_object['ipv4addr']:
|
if ('ipv4addr' in each) and ('ipv4addr' in proposed_object)\
|
||||||
|
and each['ipv4addr'] == proposed_object['ipv4addr']:
|
||||||
current_object = each
|
current_object = each
|
||||||
else:
|
else:
|
||||||
current_object = ib_obj_ref[0]
|
current_object = ib_obj_ref[0]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue