From 5c12b86b55cc21b49f4d4339b78cefff5b35cdf9 Mon Sep 17 00:00:00 2001 From: anhefti Date: Tue, 31 Aug 2021 11:16:28 +0200 Subject: [PATCH] fixed unique name message --- .../servicelayer/dao/impl/InstitutionDAOImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/InstitutionDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/InstitutionDAOImpl.java index ceedf424..a0bcedc7 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/InstitutionDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/InstitutionDAOImpl.java @@ -27,9 +27,9 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; -import ch.ethz.seb.sebserver.gbl.api.API; import ch.ethz.seb.sebserver.gbl.api.APIMessage.FieldValidationException; import ch.ethz.seb.sebserver.gbl.api.EntityType; +import ch.ethz.seb.sebserver.gbl.model.Domain; import ch.ethz.seb.sebserver.gbl.model.EntityDependency; import ch.ethz.seb.sebserver.gbl.model.EntityKey; import ch.ethz.seb.sebserver.gbl.model.institution.Institution; @@ -267,8 +267,8 @@ public class InstitutionDAOImpl implements InstitutionDAO { if (count != null && count > 0) { throw new FieldValidationException( - API.IMPORT_FILE_ATTR_NAME, - "certificate:certificate:exists"); + Domain.INSTITUTION.ATTR_NAME, + "institution:name:name.notunique"); } } }