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