fix user multioption test

This commit is contained in:
Peter Hormanns 2021-08-18 19:01:06 +02:00
parent 3605f0da4b
commit 1db36a61f1

View File

@ -135,7 +135,7 @@ public class UnixUserModuleImpl extends AbstractModuleImpl {
throw new HSAdminException("not allowed for this packet type");
}
//TODO: Needs better implementation
Query qUnixUsers = em.createQuery("SELECT obj FROM UnixUsers obj WHERE obj.id = :pacId");
Query qUnixUsers = em.createQuery("SELECT obj FROM UnixUsers obj WHERE obj.pac.id = :pacId");
qUnixUsers.setParameter("pacId", pac.getId());
if (qUnixUsers.getResultList().size() >= MultiOption.UNIXUSERS_PER_OPTION * pac.getQuantityByComponentName("MULTI")) {
throw new HSAdminException("included unix users exceeded");