Commit ea78784b authored by Côme Chilliet's avatar Côme Chilliet

Merge branch '5963-error-in-sinaps-workflow' into '1.4-dev'

Resolve "error in SINAPS workflow"

See merge request fusiondirectory/fd-plugins!619
parents 6d7ebbca cbdce345
......@@ -172,7 +172,11 @@ class sinapsDiffusionHandlerJob
}
}
$values['supannAccount']['supannRefId'] = array_values(array_unique($values['supannAccount']['supannRefId']));
$message = 'User updated';
if ($values['lock']) {
$message = 'User deleted';
} else {
$message = 'User updated';
}
}
} else {
if ($values['lock']) {
......@@ -185,7 +189,12 @@ class sinapsDiffusionHandlerJob
if ($error !== TRUE) {
$this->sendAcquittementFonctionnel(sinapsRequest::acquittementFonctionnel(200, 15, strip_tags(implode(', ', $error))));
} else {
$this->sendAcquittementFonctionnel(sinapsRequest::acquittementFonctionnel(200, 0, $message, $idObjApp));
if ($values['lock']) {
/* $values['lock'] means this was a deletion, so we must not send an object identifier in the answer */
$this->sendAcquittementFonctionnel(sinapsRequest::acquittementFonctionnel(200, 0, $message));
} else {
$this->sendAcquittementFonctionnel(sinapsRequest::acquittementFonctionnel(200, 0, $message, $idObjApp));
}
}
}
......
Markdown is supported
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