Commit e70f5b49 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Fix : La liste des personnes n'affiche plus de message d'erreur si une affectation est corrompue

parent a29c5beb
Loading
Loading
Loading
Loading
+14 −10
Original line number Diff line number Diff line
@@ -248,6 +248,7 @@ class Links extends AbstractHtmlElement implements ServiceLocatorAwareInterface
     * @param OrganizationPerson $affectation
     */
    public function affectationPerson( $affectation ){
        try {
            if( !$affectation->getPerson() || !$affectation->getOrganization() ){
                return '<span class="invalid-data">Données invalide</span>';
            }
@@ -259,6 +260,9 @@ class Links extends AbstractHtmlElement implements ServiceLocatorAwareInterface
                $css,
                $this->organization($affectation->getOrganization()),
                $affectation->getRole());
        } catch (\Exception $e) {
            $this->getServiceLocator()->get('Logger')->error("Echec rendu d'affectation d'une personne : " . $e->getMessage());
        }
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@
    <?php if( count($person->getOrganizations()) ): ?>
        <?php /** @var \Oscar\Entity\OrganizationPerson $affectation */
        foreach( $person->getOrganizations() as $affectation ): ?>
            <?= $this->link()->affectationPerson($affectation) ?>
            <?php echo $this->link()->affectationPerson($affectation); ?>
        <?php endforeach; ?>
    <?php endif; ?>
    <?php if( $person->getLdapMemberOf() != null ): ?>