FIX: Propietario no tomaba en consideracion comuna para direccion

This commit is contained in:
Juan Pablo Vial
2024-07-04 16:28:01 -04:00
parent 8cec046d66
commit fc543729d2
2 changed files with 4 additions and 4 deletions

View File

@ -114,7 +114,7 @@ class Propietario extends Service
], 0);
$filtered_data = array_intersect_key($data, $fields);
try {
$direccion = $this->direccionRepository->fetchByCalleAndNumeroAndExtra($filtered_data['calle'], $filtered_data['numero'], $filtered_data['extra']);
$direccion = $this->direccionRepository->fetchByCalleAndNumeroAndExtraAndComuna($filtered_data['calle'], $filtered_data['numero'], $filtered_data['extra'], $filtered_data['comuna']);
} catch (EmptyResult) {
$direccion = $this->direccionRepository->create($filtered_data);
$direccion = $this->direccionRepository->save($direccion);