From c368dca5365705e8709074a6e5ce2b44837416d2 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Thu, 29 Jun 2023 13:50:55 +0200 Subject: [PATCH] [Awards] Fix error when no bands are selected for POTA, SOTA and WWFF --- application/models/Pota.php | 2 ++ application/models/Sota.php | 2 ++ application/models/Wwff.php | 2 ++ 3 files changed, 6 insertions(+) diff --git a/application/models/Pota.php b/application/models/Pota.php index 117a8c42..1c5c8a40 100644 --- a/application/models/Pota.php +++ b/application/models/Pota.php @@ -15,6 +15,8 @@ class Pota extends CI_Model { $bandslots = $this->bands->get_worked_bands('pota'); + if(!$bandslots) return null; + $this->db->where_in("station_id", $logbooks_locations_array); $this->db->where_in("col_band", $bandslots); $this->db->order_by("COL_POTA_REF", "ASC"); diff --git a/application/models/Sota.php b/application/models/Sota.php index 6d47334e..46d7e5f5 100644 --- a/application/models/Sota.php +++ b/application/models/Sota.php @@ -15,6 +15,8 @@ class Sota extends CI_Model { $bandslots = $this->bands->get_worked_bands('sota'); + if(!$bandslots) return null; + $this->db->where_in("station_id", $logbooks_locations_array); $this->db->where_in("col_band", $bandslots); $this->db->order_by("COL_SOTA_REF", "ASC"); diff --git a/application/models/Wwff.php b/application/models/Wwff.php index 93908d7e..e15584c3 100644 --- a/application/models/Wwff.php +++ b/application/models/Wwff.php @@ -15,6 +15,8 @@ class Wwff extends CI_Model { $bandslots = $this->bands->get_worked_bands('wwff'); + if(!$bandslots) return null; + $this->db->where_in("station_id", $logbooks_locations_array); $this->db->where_in("col_band", $bandslots); $this->db->order_by("COL_WWFF_REF", "ASC");