From 3fe22d65007f4ef0f04ae24a3f009a2d06d1596c Mon Sep 17 00:00:00 2001 From: int2001 Date: Sun, 1 Feb 2026 17:38:10 +0000 Subject: [PATCH] check if station_id is empty or null --- application/models/Stationsetup_model.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/models/Stationsetup_model.php b/application/models/Stationsetup_model.php index 360008151..c1e4f16f0 100644 --- a/application/models/Stationsetup_model.php +++ b/application/models/Stationsetup_model.php @@ -264,6 +264,9 @@ class Stationsetup_model extends CI_Model { if ($imported >= 1000){ return (array('limit',$imported."locations imported. Maximum limit of 1000 locations reached.")); // Prevent importing more than 1000 locations at once } + if (trim($loc['station_uuid'] ?? '') == '') { // Make sure it's null, even if it's set to '' + $loc['station_uuid']=null; + } // Data for station_profile $dbdata = [ 'station_active' => 0,