Skip to content

Commit

Permalink
1 seat required
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed May 20, 2017
1 parent 2ad3657 commit 9db19fa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Core/Services/Implementations/OrganizationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,11 @@ public async Task AdjustSeatsAsync(Guid organizationId, int seatAdjustment)
throw new BadRequestException($"Plan has a minimum of {plan.BaseSeats} seats.");
}

if(newSeatTotal <= 0)
{
throw new BadRequestException("You must have at least 1 seat.");
}

var additionalSeats = newSeatTotal - plan.BaseSeats;
if(plan.MaxAdditionalSeats.HasValue && additionalSeats > plan.MaxAdditionalSeats.Value)
{
Expand Down

0 comments on commit 9db19fa

Please sign in to comment.