mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 01:49:05 +02:00
Fixed some inspection issues.
This commit is contained in:
parent
3438f15274
commit
6ddc937ec5
32 changed files with 111 additions and 208 deletions
|
@ -151,7 +151,9 @@ class PartController extends AbstractController
|
|||
$cid = $request->get('cid', 1);
|
||||
|
||||
$category = $em->find(Category::class, $cid);
|
||||
$new_part->setCategory($category);
|
||||
if($category !== null) {
|
||||
$new_part->setCategory($category);
|
||||
}
|
||||
|
||||
$form = $this->createForm(PartBaseType::class, $new_part);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue