mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 02:38:50 +02:00
Started to work on the possibilty to create new entities directly from the part edit page.
This fixes issue #203.
This commit is contained in:
parent
672d55624f
commit
1654010ea3
8 changed files with 142 additions and 84 deletions
|
@ -59,7 +59,8 @@ class ValidPartLotValidator extends ConstraintValidator
|
|||
if ($value->getStorageLocation()) {
|
||||
$repo = $this->em->getRepository(Storelocation::class);
|
||||
//We can only determine associated parts, if the part have an ID
|
||||
if (null !== $value->getID()) {
|
||||
//When the storage location is new (no ID), we can just assume there are no other parts
|
||||
if (null !== $value->getID() && $value->getStorageLocation()->getID()) {
|
||||
$parts = new ArrayCollection($repo->getParts($value->getStorageLocation()));
|
||||
} else {
|
||||
$parts = new ArrayCollection([]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue