diff options
Diffstat (limited to 'modules-available/locations/inc/autolocation.inc.php')
-rw-r--r-- | modules-available/locations/inc/autolocation.inc.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules-available/locations/inc/autolocation.inc.php b/modules-available/locations/inc/autolocation.inc.php index 61507ebf..82c61251 100644 --- a/modules-available/locations/inc/autolocation.inc.php +++ b/modules-available/locations/inc/autolocation.inc.php @@ -43,6 +43,9 @@ class AutoLocation Database::exec("UPDATE machine SET subnetlocationid = :lid WHERE machineuuid IN (:machines)", ['lid' => $lid, 'machines' => $machines]); } + // While we're at it, try to fix invalid entries, having a fixedlocationid but no actual position information + Database::exec('UPDATE machine SET fixedlocationid = NULL + WHERE fixedlocationid IS NOT NULL AND Length(position) = 0'); } } |