This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository wao. See http://git.codelutin.com/wao.git commit fb294ac8f54e66a21e85626ca9295f690571d850 Author: Brendan Le Ny <bleny@codelutin.com> Date: Thu Mar 12 16:22:05 2015 +0100 On corrige un contrôle de validation qui ne devrait être fait que sous Scléro et pas sous ObsMer on ObsVente (termine #6811) --- .../java/fr/ifremer/wao/services/service/ContactsService.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java b/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java index 80ffefb..6cef29f 100644 --- a/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java +++ b/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java @@ -872,10 +872,12 @@ public class ContactsService extends WaoServiceSupport { throw new MismatchContactMainObserverCompanyException(contact, mainObserver, contact.getSampleRow().getOrganisation()); } - // pour scléro, les observateurs peuvent appartenir à la même société mais des labos différents. Toutefois, l'observateur - // principal doit appartenir au labo - if ( ! contact.getMainObserver().getOrganisation().equals(contact.getSampleRow().getOrganisation())) { - throw new MismatchContactMainObserverCompanyException(contact, mainObserver, contact.getSampleRow().getOrganisation()); + if (contact.getObsProgram().isSclerochronology()) { + // pour scléro, les observateurs peuvent appartenir à la même société mais des labos différents. Toutefois, l'observateur + // principal doit appartenir au labo + if (!contact.getMainObserver().getOrganisation().equals(contact.getSampleRow().getOrganisation())) { + throw new MismatchContactMainObserverCompanyException(contact, mainObserver, contact.getSampleRow().getOrganisation()); + } } if (contact.isSecondaryObserversNotEmpty()) { -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.