mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Fixed errors when setting setParent on a proxied AbstractStructuralDBElement
This commit is contained in:
parent
19530a9102
commit
78b0e1bf7e
1 changed files with 1 additions and 5 deletions
|
@ -26,6 +26,7 @@ use App\Entity\Attachments\Attachment;
|
|||
use App\Entity\Parameters\AbstractParameter;
|
||||
use App\Repository\StructuralDBElementRepository;
|
||||
use App\EntityListeners\TreeCacheInvalidationListener;
|
||||
use Doctrine\Common\Proxy\Proxy;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use App\Entity\Attachments\AttachmentContainingDBElement;
|
||||
use App\Entity\Parameters\ParametersTrait;
|
||||
|
@ -348,11 +349,6 @@ abstract class AbstractStructuralDBElement extends AttachmentContainingDBElement
|
|||
throw new \InvalidArgumentException('You can not use one of the element childs as parent!');
|
||||
} */
|
||||
|
||||
//Ensure that the parent is of the same type as this element
|
||||
if (!$new_parent instanceof static) {
|
||||
throw new \InvalidArgumentException('The parent must be of the same type as this element!');
|
||||
}
|
||||
|
||||
$this->parent = $new_parent;
|
||||
|
||||
//Add this element as child to the new parent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue