Skip to content

Commit

Permalink
[API] When looking up a grid only do first 4 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
magicbug committed Jun 19, 2024
1 parent ccb9f59 commit 24f3b33
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions application/models/Logbook_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -2037,6 +2037,9 @@ function check_if_grid_worked_in_logbook($grid, $StationLocationsArray = null, $
$logbooks_locations_array = $StationLocationsArray;
}

// Only take the first 4 characters of the grid
$grid = substr($grid, 0, 4);

$this->db->select('COL_GRIDSQUARE');
$this->db->where_in('station_id', $logbooks_locations_array);
$this->db->group_start();
Expand Down

0 comments on commit 24f3b33

Please sign in to comment.