Allow updating distance to 0km in QSO edit rather thank skipping and

keeping the old value for distance
This commit is contained in:
phl0
2026-01-23 09:05:42 +01:00
parent e1e0bb60ea
commit 04e04334cc

View File

@@ -1669,7 +1669,9 @@ class Logbook_model extends CI_Model {
$dclrdate = $qso->COL_DCL_QSLRDATE;
}
if (($this->input->post('distance')) && (is_numeric($this->input->post('distance')))) {
if (is_numeric($this->input->post('distance')) && $this->input->post('distance') == 0) {
$distance = 0;
} elseif (($this->input->post('distance')) && (is_numeric($this->input->post('distance')))) {
$distance = $this->input->post('distance');
} else {
$distance = null;