Commit 193785209ff1b4e66580af71fdf0d39f830764d8
1 parent
1f584a48
Exists in
2.8
and in
6 other branches
Adiciona ternario para data nascimento
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
ieducar/modules/Api/Views/PessoaController.php
... | ... | @@ -594,7 +594,7 @@ class PessoaController extends ApiCoreController |
594 | 594 | { |
595 | 595 | $individual = LegacyIndividual::findOrNew($pessoaId); |
596 | 596 | $individual->idpes = $pessoaId; |
597 | - $individual->data_nasc = Portabilis_Date_Utils::brToPgSQL($this->getRequest()->datanasc); | |
597 | + $individual->data_nasc = empty($this->getRequest()->datanasc) ? null : Portabilis_Date_Utils::brToPgSQL($this->getRequest()->datanasc); | |
598 | 598 | $individual->sexo = $this->getRequest()->sexo; |
599 | 599 | $individual->ref_cod_sistema = null; |
600 | 600 | $individual->ideciv = $this->getRequest()->estadocivil ?: $individual->ideciv; | ... | ... |