minor fix

This commit is contained in:
anhefti 2020-03-31 14:26:40 +02:00
parent f6c9606ac7
commit de8db15928

View file

@ -17,6 +17,7 @@ import java.util.Set;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.function.Function; import java.util.function.Function;
import java.util.function.Supplier; import java.util.function.Supplier;
import java.util.stream.Stream;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
@ -231,11 +232,15 @@ public class PageServiceImpl implements PageService {
entity.entityType(), entity.entityType(),
CallType.GET_DEPENDENCIES); CallType.GET_DEPENDENCIES);
return builder if (builder != null) {
.withURIVariable(API.PARAM_MODEL_ID, String.valueOf(entity.getModelId())) return builder
.withQueryParam(API.PARAM_BULK_ACTION_TYPE, BulkActionType.DEACTIVATE.name()) .withURIVariable(API.PARAM_MODEL_ID, String.valueOf(entity.getModelId()))
.call() .withQueryParam(API.PARAM_BULK_ACTION_TYPE, BulkActionType.DEACTIVATE.name())
.getOrThrow().stream(); .call()
.getOrThrow().stream();
} else {
return Stream.empty();
}
}).count(); }).count();
if (dependencies > 0) { if (dependencies > 0) {
return new LocTextKey(CONFIRM_DEACTIVATION_KEY, String.valueOf(dependencies)); return new LocTextKey(CONFIRM_DEACTIVATION_KEY, String.valueOf(dependencies));