mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
ovirt_networks: Fix label assigment condition (#31772)
This commit is contained in:
parent
e648a00312
commit
052f4d2571
1 changed files with 3 additions and 1 deletions
|
@ -149,9 +149,11 @@ class NetworksModule(BaseModule):
|
|||
self._update_label_assignments(entity)
|
||||
|
||||
def _update_label_assignments(self, entity):
|
||||
if self.param('label') is None:
|
||||
return
|
||||
|
||||
labels = [lbl.id for lbl in self._connection.follow_link(entity.network_labels)]
|
||||
labels_service = self._service.service(entity.id).network_labels_service()
|
||||
|
||||
if not self.param('label') in labels:
|
||||
if not self._module.check_mode:
|
||||
if labels:
|
||||
|
|
Loading…
Reference in a new issue