Skip to content

Commit

Permalink
Sql null comparison needs to be 'is null' and not '= null'
Browse files Browse the repository at this point in the history
  • Loading branch information
ljdelight committed Jan 16, 2024
1 parent 96539bf commit 5a03bf4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/org/maproulette/jobs/SchedulerActor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 5a03bf4

Please sign in to comment.