Commit 5b7e3ce5 authored by Théo GUILLON's avatar Théo GUILLON
Browse files

Correction : sur la recherche du responsable via le siret

parent 9a301990
......@@ -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