joachimdieterich / laravel-curriculum-adminlte3

curriculum (laravel)
MIT License
15 stars 10 forks source link

New Organisation-Type: Error 500 if you click on new organisation-types / federal-state is not saved correctly #122

Closed Shen closed 3 years ago

Shen commented 3 years ago

If I create a new organisation-type the added federal state is shown like this ["..."]. organisation-type If I click on the new organisation-type to view the detail-information-site, I get an error 500: ErrorException Trying to get property 'lang_de' of non-object (View: [PATH]/laravel-curriculum-adminlte3/resources/views/organizationtypes/show.blade.php) https://[URL]/organizationtypes/35

If I edit the new organisation, the federal state field is empty.

Shen commented 3 years ago

New Error if I try to save changes:

Illuminate\Database\QueryException SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (curriculum.organization_types, CONSTRAINT organization_types_country_id_foreign FOREIGN KEY (country_id) REFERENCES countries (alpha2)) (SQL: update organization_types set state_id = ["DE-NW"], country_id = ["DE"], organization_types.updated_at = 2020-12-20 23:42:35 where id = 36)