Commit 60525148 authored by Sean McGivern's avatar Sean McGivern

Fix reviewer roulette when no-one is in a category

This would return `people.size` before, when it should return `nil`.
parent 0ed961a8
...@@ -57,10 +57,12 @@ def spin_for_person(people, random:) ...@@ -57,10 +57,12 @@ def spin_for_person(people, random:)
people.size.times do people.size.times do
person = people.sample(random: random) person = people.sample(random: random)
return person unless out_of_office?(person) break person unless out_of_office?(person)
people -= [person] people -= [person]
end end
person
end end
def out_of_office?(person) def out_of_office?(person)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment