Ensure we don't approve when groups are lower than the requested number
This commit is contained in:
parent
e002c5c9d5
commit
1bef611806
1 changed files with 2 additions and 1 deletions
|
@ -120,7 +120,8 @@ def members_to_groups(matchees: list[Member],
|
||||||
groups = attempt_create_groups(
|
groups = attempt_create_groups(
|
||||||
matchees, hist, oldest_relevant_datetime, num_groups)
|
matchees, hist, oldest_relevant_datetime, num_groups)
|
||||||
|
|
||||||
if groups:
|
# Fail the match if our groups aren't big enough
|
||||||
|
if groups and all(len(g) > per_group for g in groups):
|
||||||
logger.info("Matched groups after %s attempt(s)", attempts)
|
logger.info("Matched groups after %s attempt(s)", attempts)
|
||||||
return groups
|
return groups
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue