aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/zot.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/zot.php b/include/zot.php
index aea8a992a..2400643a7 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1843,6 +1843,8 @@ function sync_locations($sender,$arr,$absolute = false) {
dbesc(datetime_convert()),
intval($r[0]['hubloc_id'])
);
+ // make sure hubloc_change_primary() has current data
+ $r[0]['hubloc_flags'] = $r[0]['hubloc_flags'] ^ HUBLOC_FLAGS_PRIMARY;
hubloc_change_primary($r[0]);
$what .= 'primary_hub ';
$changed = true;