Skip to content

Commit

Permalink
fix(portal): Fix the processing logic when the consumer obtains an em…
Browse files Browse the repository at this point in the history
…pty quota
  • Loading branch information
youngzil committed Nov 27, 2024
1 parent 5390f62 commit 9126bb3
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import org.springframework.util.CollectionUtils;

/**
* @author Jason Song([email protected])
Expand Down Expand Up @@ -233,7 +234,11 @@ private boolean isAllowCreateApplication(Long consumerId) {
}

private Integer getRateLimit(Long consumerId) {
return getRateLimit(Collections.singletonList(consumerId)).get(0);
List<Integer> list = getRateLimit(Collections.singletonList(consumerId));
if(CollectionUtils.isEmpty(list)){
return 0;
}
return list.get(0);
}

private List<Boolean> isAllowCreateApplication(List<Long> consumerIdList) {
Expand Down

0 comments on commit 9126bb3

Please sign in to comment.