From 060d4ac2e3a66bf63a433f32c851248ce3d98334 Mon Sep 17 00:00:00 2001 From: Mygod Date: Tue, 10 Dec 2024 00:30:38 -0800 Subject: [PATCH] fix: search raid before hatching --- server/src/models/Gym.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/src/models/Gym.js b/server/src/models/Gym.js index 29787eda6..e7106ab9d 100644 --- a/server/src/models/Gym.js +++ b/server/src/models/Gym.js @@ -535,11 +535,7 @@ class Gym extends Model { .whereIn(isMad ? 'pokemon_id' : 'raid_pokemon_id', pokemonIds) .limit(config.getSafe('api.searchResultsLimit')) .orderBy('distance') - .andWhere( - isMad ? 'start' : 'raid_battle_timestamp', - '<=', - isMad ? this.knex().fn.now() : ts, - ) + .andWhere('raid_pokemon_id', '>', 0) .andWhere( isMad ? 'end' : 'raid_end_timestamp', '>=',