We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e491668 commit 8d871e0Copy full SHA for 8d871e0
src/CustomerProvider/ObjectNamingScheme/DefaultObjectNamingScheme.php
@@ -76,7 +76,11 @@ public function apply(CustomerInterface $customer)
76
77
$parentPath = $this->correctPath($parentPath);
78
79
- $customer->setParent(Service::createFolderByPath($parentPath));
+ if ($parent = Service::getElementByPath('object', $parentPath)) {
80
+ $customer->setParent($parent);
81
+ } else {
82
+ $customer->setParent(Service::createFolderByPath($parentPath));
83
+ }
84
85
if (!$customer->getKey()) {
86
$customer->setKey(uniqid());
0 commit comments