|
@@ -80,14 +80,12 @@ class SubnetStatusOrHostTypeChangeSubscriber implements EventSubscriber
|
|
|
}
|
|
|
}
|
|
|
foreach ($hosts as $host) {
|
|
|
- if ($host->getFixedAddress() != '') {
|
|
|
- $host->setFixedAddress(null);
|
|
|
- $host->setIpv4Address(null);
|
|
|
- $host->setFixedIP(false);
|
|
|
-
|
|
|
- $em->persist($host);
|
|
|
- $em->flush($host);
|
|
|
- }
|
|
|
+ $host->setFixedAddress(null);
|
|
|
+ $host->setIpv4Address(null);
|
|
|
+ $host->setFixedIP(false);
|
|
|
+
|
|
|
+ $em->persist($host);
|
|
|
+ $em->flush($host);
|
|
|
}
|
|
|
}
|
|
|
} catch (\Exception $ex) {
|