Browse Source

If no generic gender is found, proceed without update

pull/6482/head
Jeroen De Meerleer 2 years ago
committed by Hypolite Petovan
parent
commit
c7d4838400
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      update.php

+ 2
- 2
update.php View File

@ -289,12 +289,12 @@ function update_1293()
// defaulting to empty string
$key = '';
}
DBA::update('contact', ['gender' => $key], ['id' => $gender['id']]);
logger::log('Updated contact ' . $gender['id'] . ' to gender ' . $key . ' (was: ' . $gender['gender'] . ')');
if ($key == '') {
$fail++;
} else {
DBA::update('contact', ['gender' => $key], ['id' => $gender['id']]);
logger::log('Updated contact ' . $gender['id'] . ' to gender ' . $key . ' (was: ' . $gender['gender'] . ')');
$success++;
}
}


Loading…
Cancel
Save