mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 10:49:00 +02:00
Renamed Storelocation entity to StorageLocation
This commit is contained in:
parent
09acca950d
commit
0af5a58dbe
59 changed files with 218 additions and 176 deletions
|
@ -23,7 +23,7 @@ declare(strict_types=1);
|
|||
namespace App\Validator\Constraints;
|
||||
|
||||
use App\Entity\Parts\PartLot;
|
||||
use App\Entity\Parts\Storelocation;
|
||||
use App\Entity\Parts\StorageLocation;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
|
@ -53,8 +53,8 @@ class ValidPartLotValidator extends ConstraintValidator
|
|||
}
|
||||
|
||||
//We can only validate the values if we know the storelocation
|
||||
if ($value->getStorageLocation() instanceof Storelocation) {
|
||||
$repo = $this->em->getRepository(Storelocation::class);
|
||||
if ($value->getStorageLocation() instanceof StorageLocation) {
|
||||
$repo = $this->em->getRepository(StorageLocation::class);
|
||||
//We can only determine associated parts, if the part have an ID
|
||||
//When the storage location is new (no ID), we can just assume there are no other parts
|
||||
if (null !== $value->getID() && $value->getStorageLocation()->getID()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue