Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions addons/gamification/models/gamification_challenge.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,7 @@ def _update_all(self):
self.env.cr.execute("""SELECT gg.id
FROM gamification_goal as gg
JOIN bus_presence as bp ON bp.user_id = gg.user_id
WHERE gg.write_date <= bp.last_presence
AND bp.last_presence >= now() AT TIME ZONE 'UTC' - interval '%(session_lifetime)s seconds'
AND gg.closed IS NOT TRUE
WHERE gg.closed IS NOT TRUE
AND gg.challenge_id IN %(challenge_ids)s
AND (gg.state = 'inprogress'
OR (gg.state = 'reached' AND gg.end_date >= %(yesterday)s))
Expand Down