Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A deactivated team that subscribes for the first time isn't reactivated #158

Open
dblock opened this issue Jan 30, 2024 · 1 comment
Open

Comments

@dblock
Copy link
Owner

dblock commented Jan 30, 2024

  1. Team on trial
  2. Trial expires, team deactivated
  3. Subscribe
  4. Team is not re-activated but marked as subscribed

Also related, #134.

@dblock
Copy link
Owner Author

dblock commented Jan 30, 2024

total = 0
Team.no_timeout.active.each do |team|
  next unless team.activities.unbragged.any?
  puts "#{team}"
  team.users.each do |user|
    next unless user.activities.unbragged.any?
    puts " #{user}: #{user.activities.unbragged.count}"
    total += user.activities.unbragged.count
  end
  team.clubs.each do |club|
    next unless club.activities.unbragged.any?
    puts " club_id=#{club.strava_id}, name=#{club.name}: #{club.activities.unbragged.count}"
    total += club.activities.unbragged.count
  end
end; puts "total=#{total}"; nil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant