Skip to content
Snippets Groups Projects
Verified Commit 117ffd9f authored by Damien's avatar Damien
Browse files

FEAT #12764 TIME 0:05 Do not check dest when visaCircuit or opinion

parent 63b0458c
No related branches found
No related tags found
No related merge requests found
......@@ -138,14 +138,16 @@ class ListInstanceController
'data' => [$ListInstanceByRes['resId'], $ListInstanceByRes['listInstances'][0]['difflist_type']]
]);
$recipientFound = false;
foreach ($ListInstanceByRes['listInstances'] as $instance) {
if ($instance['item_mode'] == 'dest') {
$recipientFound = true;
if ($ListInstanceByRes['listInstances'][0]['difflist_type'] == 'entity_id') {
$recipientFound = false;
foreach ($ListInstanceByRes['listInstances'] as $instance) {
if ($instance['item_mode'] == 'dest') {
$recipientFound = true;
}
}
if (!$recipientFound) {
return ['errors' => 'Dest is missing', 'code' => 403];
}
}
if (!$recipientFound) {
return ['errors' => 'Dest is missing', 'code' => 403];
}
foreach ($ListInstanceByRes['listInstances'] as $instance) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment