From 7e0f096a5eeb96e3e50176690d6dc0ac4a65589e Mon Sep 17 00:00:00 2001 From: Celestino Bellone Date: Tue, 14 Jul 2015 19:05:26 +0200 Subject: [PATCH] #39 - "bounded" flag toggle not yet implemented --- src/main/java/alfio/manager/EventManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/alfio/manager/EventManager.java b/src/main/java/alfio/manager/EventManager.java index fd75950f34..e19cef68e5 100644 --- a/src/main/java/alfio/manager/EventManager.java +++ b/src/main/java/alfio/manager/EventManager.java @@ -28,7 +28,6 @@ import alfio.model.TicketCategory; import alfio.model.modification.*; import alfio.model.system.Configuration; -import alfio.model.system.ConfigurationKeys; import alfio.model.transaction.PaymentProxy; import alfio.model.user.Organization; import alfio.repository.*; @@ -213,6 +212,9 @@ public void updateCategory(int categoryId, int eventId, TicketCategoryModificati if((tcm.isTokenGenerationRequested() ^ existing.isAccessRestricted()) && ticketRepository.countConfirmedAndPendingTickets(eventId, categoryId) > 0) { throw new IllegalStateException("cannot update the category. There are tickets already sold."); } + if(tcm.isBounded() ^ existing.isBounded()) { + throw new IllegalStateException("Bounded flag modification is not yet implemented."); + } updateCategory(tcm, event.getVat(), event.isVatIncluded(), event.isFreeOfCharge(), event.getZoneId(), event); }