From c32468a9c519f3beaa3ae8dc69cc8036725fc7c4 Mon Sep 17 00:00:00 2001 From: Ricardo Signes Date: Mon, 10 Aug 2020 08:57:10 -0400 Subject: [PATCH] Rototron: allow per-staffer per-rotor exemption --- lib/Synergy/Rototron.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Synergy/Rototron.pm b/lib/Synergy/Rototron.pm index d05ea30d..385a6ee2 100644 --- a/lib/Synergy/Rototron.pm +++ b/lib/Synergy/Rototron.pm @@ -404,10 +404,12 @@ package Synergy::Rototron::Rotor { my @staff = $self->_full_staff->@*; return [@staff] unless my $filter = $self->_staff_filter; + my $name = $self->name; + @staff = grep {; (! $filter->{region} or $_->{region} eq $filter->{region}) && - (! $filter->{team} or $_->{team} eq $filter->{team}) + (! $filter->{team} or (grep { $_ eq $filter->{team} } $_->{teams}->@*)) } @staff; return [@staff];