Skip to content

Commit

Permalink
Store team_id in daily_leaderboard
Browse files Browse the repository at this point in the history
  • Loading branch information
pjurewicz committed Oct 10, 2023
1 parent 210b78d commit 83fbac3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/daily_leaderboard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def self.apply_upvote_received(event)
return unless team.time_zone
DailyLeaderboard.transaction do
record = DailyLeaderboard.find_or_create_by!(
team_id: team.id,
user_name: TeamMember.find(event.data.fetch(:recipient_id)).slack_user_name,
date: event.valid_at.in_time_zone(team.time_zone).to_date
).lock!
Expand Down

0 comments on commit 83fbac3

Please sign in to comment.