From 589c1c8021cae053035927f4c0aa5f53210d1668 Mon Sep 17 00:00:00 2001 From: int2001 Date: Tue, 17 Oct 2023 17:31:32 +0000 Subject: [PATCH] Fixes issue that reassign failed, when col_station_callsign was not given --- application/models/Logbook_model.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 72d804d6..ae3226eb 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -4148,7 +4148,11 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray = ); $this->db->where(array('station_id' => NULL)); - $this->db->where('col_station_callsign', $station_callsign); + if ($station_callsign == '') { + $this->db->where(array('col_station_callsign' => NULL)); + } else { + $this->db->where('col_station_callsign', $station_callsign); + } $this->db->update($this->config->item('table_name'), $data); if ($this->db->affected_rows() > 0) { return TRUE;