Fix bug: $type from loop should be used!

We weren't using the type variable from the loop!
This commit is contained in:
Bradley M. Kuhn 2016-05-26 20:39:40 -07:00
parent 6a6ec1fca2
commit 6147f2b869

View file

@ -79,7 +79,7 @@ sub sortFunction($$) {
foreach my $id (sort { sortFunction($a, $b); } @supporterIds) {
my $sizeNeeded;
foreach my $type (qw/t-shirt-0 t-shirt-1/) {
my $request = $sp->getRequest({ donorId => $id, requestType => 't-shirt-0', ignoreFulfilledRequests => 1 });
my $request = $sp->getRequest({ donorId => $id, requestType => $type, ignoreFulfilledRequests => 1 });
if (defined $request and defined $request->{requestType}) {
$sizeNeeded = $request->{requestConfiguration};
last;