Unverified Commit fdb837dc authored by Côme Chilliet's avatar Côme Chilliet
Browse files

🚑 fix(sinaps) Avoid useless search in referenceCroisee

In most cases there is identifiantStructureInterne which directly
 contains the FD UUID ready to use.

issue #5918
parent 4ecf6baf
...@@ -366,7 +366,7 @@ class sinapsRequest ...@@ -366,7 +366,7 @@ class sinapsRequest
if (!$this->checkValidite($affectation, $now)) { if (!$this->checkValidite($affectation, $now)) {
continue; continue;
} }
$UUID = $this->getUUIDFromReferenceCroisee($identifiantApplication, $affectation->referenceCroisee); $UUID = (string)$affectation->identifiantStructureInterne;
$quotite = (isset($affectation->quotite) ? (int)$affectation->quotite : 0); $quotite = (isset($affectation->quotite) ? (int)$affectation->quotite : 0);
if (!empty($UUID)) { if (!empty($UUID)) {
$entite = $ldapUuidToCodeEntiteCallback($UUID); $entite = $ldapUuidToCodeEntiteCallback($UUID);
...@@ -403,7 +403,7 @@ class sinapsRequest ...@@ -403,7 +403,7 @@ class sinapsRequest
continue; continue;
} }
$values['supannAccount']['supannRoleGenerique'][] = (string)$fonctionOccupee->fonctionRh; $values['supannAccount']['supannRoleGenerique'][] = (string)$fonctionOccupee->fonctionRh;
$UUID = $this->getUUIDFromReferenceCroisee($identifiantApplication, $fonctionOccupee->referenceCroisee); $UUID = (string)$fonctionOccupee->identifiantStructureInterne;
if (!empty($UUID)) { if (!empty($UUID)) {
$entite = $ldapUuidToCodeEntiteCallback($UUID, TRUE); $entite = $ldapUuidToCodeEntiteCallback($UUID, TRUE);
$values['supannAccount']['supannTypeEntiteAffectation'][] = $entite['supannTypeEntite']; $values['supannAccount']['supannTypeEntiteAffectation'][] = $entite['supannTypeEntite'];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment