ovirt_networks: Fix label assigment condition (#31772)

pull/28849/merge
Ondra Machacek 7 years ago committed by ansibot
parent e648a00312
commit 052f4d2571

@ -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…
Cancel
Save