Skip to content

Commit

Permalink
Merge pull request #1116 from givepraise/fix/quant-assignment-bug
Browse files Browse the repository at this point in the history
Fix quantifier assignment bug affecting
  • Loading branch information
kristoferlund committed Jul 24, 2023
2 parents 8c8d738 + 0d16916 commit a587d47
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/api/src/periods/services/period-assignments.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,12 @@ export class PeriodAssignmentsService {
let response;

if (PRAISE_QUANTIFIERS_ASSIGN_EVENLY) {
// When quantifiers are assigned evenly, the quantifier pool size needed
// is the number of quantifiers per praise receiver plus one.
const quantifierPoolSizeNeeded =
PRAISE_QUANTIFIERS_PER_PRAISE_RECEIVER + 1;
response = {
quantifierPoolSize,
quantifierPoolSizeNeeded,
quantifierPoolSizeNeeded: PRAISE_QUANTIFIERS_PER_PRAISE_RECEIVER,
quantifierPoolDeficitSize:
quantifierPoolSizeNeeded > quantifierPoolSize
? quantifierPoolSizeNeeded - quantifierPoolSize
PRAISE_QUANTIFIERS_PER_PRAISE_RECEIVER > quantifierPoolSize
? PRAISE_QUANTIFIERS_PER_PRAISE_RECEIVER - quantifierPoolSize
: 0,
};
} else {
Expand Down

0 comments on commit a587d47

Please sign in to comment.