Skip to content

Commit

Permalink
fix: student import
Browse files Browse the repository at this point in the history
  • Loading branch information
igorgoncalves committed Apr 16, 2024
1 parent 60a80f8 commit e766699
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/models/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ public function importRegister301($line, $year)
$studentIdentificationModel->send_year = $this->year;
$studentDocumentModel->school_inep_id_fk = $studentIdentificationModel->school_inep_id_fk;
$studentDocumentModel->residence_zone = $studentDocumentModel->residence_zone == "" ? 1 : $studentDocumentModel->residence_zone;
$studentDocumentModel->setScenario("censoimport");
if ($studentIdentificationModel->validate() && $studentDocumentModel->validate()) {
if ($studentIdentificationModel->save(false)) {
$studentDocumentModel->student_fk = $studentIdentificationModel->inep_id;
Expand Down
2 changes: 1 addition & 1 deletion app/models/StudentDocumentsAndAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function rules()
// The following rule is used by search().
// @todo Please remove those attributes that should not be searched.
array('register_type, school_inep_id_fk, student_fk, id, rg_number, rg_number_edcenso_organ_id_emitter_fk, rg_number_edcenso_uf_fk, rg_number_expediction_date, civil_certification, civil_certification_type, civil_certification_term_number, civil_certification_sheet, civil_certification_book, civil_certification_date, notary_office_uf_fk, notary_office_city_fk, edcenso_notary_office_fk, civil_register_enrollment_number, cpf, foreign_document_or_passport, nis, residence_zone, cep, address, number, complement, neighborhood, edcenso_uf_fk, edcenso_city_fk, received_cc, received_address, received_photo, received_nis, received_history, received_responsable_rg, received_responsable_cpf, cns, fkid, justice_restriction, diff_location', 'safe', 'on'=>'search'),
array('cpf', 'validateCPF')
array('cpf', 'validateCPF', 'except' => "censoimport")
);
}

Expand Down

0 comments on commit e766699

Please sign in to comment.