fix: null->0 for parent_id/sort NOT NULL columns; prevent DB constraint violation
This commit is contained in:
@@ -49,6 +49,7 @@ class DictionaryController extends Controller
|
||||
]);
|
||||
|
||||
$data['dictionary_id'] = $dictionary->id;
|
||||
$data['sort'] = $data['sort'] ?? 0;
|
||||
$item = DictionaryItem::create($data);
|
||||
return $this->success($item, '创建成功');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user