このコミットが含まれているのは:
守矢諏訪子 2021-10-31 13:38:12 +09:00
コミット 4f1152e73e
1個のファイルの変更4行の追加4行の削除

ファイルの表示

@ -469,7 +469,7 @@ class MeetingsController extends Controller {
$child_select = ['image', 'last_name', 'first_name'];
// 取得に成功
if (null === ($result = Meeting::select($meeting_select)->where('id', $meeting_id)->where('father_id', (int)$r->father_id)->first())) {
if (null === ($result = Meeting::select($meeting_select)->where('id', (int)$meeting_id)->first())) {
return ['status_code' => 400];
}
@ -480,9 +480,9 @@ class MeetingsController extends Controller {
return ['status_code' => 400];
}
foreach ($result->approval as $i => $r) {
if (null === ($result->approval[$i]['child'] = Child::select($child_select)->where('id', (int)$r->child_id)->first())) {
return ['status_code' => 400];
foreach ($result->approval as $i => $a) {
if (null === ($result->approval[$i]['child'] = Child::select($child_select)->where('id', (int)$a->child_id)->first())) {
$result->approval[$i]['child'] = [];
}
}