From 5a03bf40f0952de886ee8d93374cbb388ba2587a Mon Sep 17 00:00:00 2001 From: Lucas Burson Date: Tue, 16 Jan 2024 01:14:52 -0600 Subject: [PATCH] Sql null comparison needs to be 'is null' and not '= null' --- app/org/maproulette/jobs/SchedulerActor.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/org/maproulette/jobs/SchedulerActor.scala b/app/org/maproulette/jobs/SchedulerActor.scala index b1cf9629..09f45e78 100644 --- a/app/org/maproulette/jobs/SchedulerActor.scala +++ b/app/org/maproulette/jobs/SchedulerActor.scala @@ -431,11 +431,11 @@ class SchedulerActor @Inject() ( ) db.withConnection { implicit c => SQL( - s"DELETE FROM user_leaderboard WHERE country_code = NULL AND month_duration = {monthDuration}" + s"DELETE FROM user_leaderboard WHERE country_code IS NULL AND month_duration = {monthDuration}" ).on(Symbol("monthDuration") -> monthDuration) .executeUpdate() SQL( - s"DELETE FROM user_top_challenges WHERE country_code = NULL AND month_duration = {monthDuration}" + s"DELETE FROM user_top_challenges WHERE country_code IS NULL AND month_duration = {monthDuration}" ).on(Symbol("monthDuration") -> monthDuration).executeUpdate() SQL(LeaderboardHelper.rebuildChallengesLeaderboardSQL(monthDuration, config))