Skip to content

Commit

Permalink
fixed full check
Browse files Browse the repository at this point in the history
  • Loading branch information
nik-dange committed Apr 29, 2024
1 parent 5e4e696 commit 7bc659e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions services/MerchOrderService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ export default class MerchOrderService {

// Verify that this order would not set the pickup event's order count
// over the order limit
if (MerchOrderService.isLessThanTwoDaysBeforePickupEvent(pickupEvent)) {
throw new UserError('Cannot change order pickup to an event that starts in less than 2 days');
if (MerchOrderService.isPickupEventOrderLimitFull(pickupEvent)) {
throw new UserError('This merch pickup event is full! Please choose a different pickup event');
}

const totalCost = MerchOrderService.totalCost(originalOrder, itemOptions);
Expand Down
2 changes: 0 additions & 2 deletions tests/merchOrder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1805,8 +1805,6 @@ describe('merch order pickup events', () => {
pickupEvent: pickupEvent.uuid,
};

console.log('PICKUP EVENT', pickupEvent);

await expect(merchController.placeMerchOrder(placeMerchOrderRequest, member))
.rejects
.toThrow('This merch pickup event is full! Please choose a different pickup event');
Expand Down

0 comments on commit 7bc659e

Please sign in to comment.