From bf32a713eaa9d4ca826fb9ca0d988d8dc453ac27 Mon Sep 17 00:00:00 2001 From: anhefti Date: Wed, 18 Jan 2023 17:07:36 +0100 Subject: [PATCH] fixed action error on lists when unselected --- .../ethz/seb/sebserver/gui/service/page/PageService.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/page/PageService.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/page/PageService.java index 11c1883e..5923c2f3 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/page/PageService.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/page/PageService.java @@ -157,12 +157,6 @@ public interface PageService { return this.activationToggleActionFunction(table, noSelectionText, null); } -// /** Get a message supplier to notify deactivation dependencies to the user for all given entities -// * -// * @param entities Set of entities to collect the dependencies for -// * @return a message supplier to notify deactivation dependencies to the user */ -// Supplier confirmDeactivation(final Set keys); - /** Get a message supplier to notify deactivation dependencies to the user for given entity * * @param entity the entity instance @@ -180,6 +174,9 @@ public interface PageService { throw new PageMessageException(MESSAGE_NO_MULTISELECTION); } final T entity = table.getSingleSelectedROWData(); + if (entity == null) { + return null; + } if (!entity.isActive()) { return null; }