Skip to content

Commit

Permalink
Hotfix for Delegates metadata sync failing (#9192)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljames-dj committed Apr 4, 2024
1 parent a47d343 commit f15caa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/jobs/delegates_metadata_sync_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class DelegatesMetadataSyncJob < WcaCronjob
def perform
UserGroup.delegate_regions.flat_map(&:roles).map do |role|
unless role.is_lead?
if role.is_a?(UserRole) && !role.is_lead?
user = role.user
role.metadata.first_delegated = user.actually_delegated_competitions.to_a.minimum(:start_date)
role.metadata.last_delegated = user.actually_delegated_competitions.to_a.maximum(:start_date)
Expand Down

0 comments on commit f15caa5

Please sign in to comment.