Merge pull request #1271 from openclassify/vedat

fix name object problem
This commit is contained in:
profstyle1 2022-01-13 10:09:40 +03:00 committed by GitHub
commit 276c9ef030
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,8 @@ class AdressController extends AdminController
$table->setColumns(array_merge($table->getColumns(), [ $table->setColumns(array_merge($table->getColumns(), [
'city' => [ 'city' => [
'value' => function (EntryInterface $entry, CityRepositoryInterface $cityRepository) { 'value' => function (EntryInterface $entry, CityRepositoryInterface $cityRepository) {
return $cityRepository->find($entry->city)->name; $city = $cityRepository->find($entry->city);
return ($city) ? $city->name : '-';
}, },
], ],
])); ]));