Commit 86d11a09 authored by THEO GUILLON's avatar THEO GUILLON
Browse files

Merge branch '396-pb-lors-de-l-ajout-d-une-organisation' into '2.0.0'

Resolve "Pb lors de l'ajout d'une organisation"

See merge request libriciel/pole-citoyens/web-DPO/web-DPO!377
parents 9a301990 5b7e3ce5
......@@ -846,7 +846,7 @@ class OrganisationsController extends AppController
{
$responsable = $this->Responsable->find('first', [
'conditions' => [
'siretstructure' => $this->request->data('Organisation.siret')
'siretstructure' => str_replace(' ', '', $this->request->data('Organisation.siret'))
]
]);
......@@ -870,6 +870,8 @@ class OrganisationsController extends AppController
]);
$success = $success && false !== $this->Responsable->save(null, ['atomic' => false]);
debug($this->Responsable->validationErrors);
if ($success == true) {
$success = $success && $this->Organisation->updateAll([
'responsable_id' => $this->Responsable->id
......
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