|
|
|
@@ -39,13 +39,13 @@ class PostingApiToEntityMapper implements MapperInterface |
|
|
|
} else { |
|
|
|
$user = $this->security->getUser(); |
|
|
|
assert($user instanceof User); |
|
|
|
if ($dto->partner === null) { |
|
|
|
if ($dto->partnerIri === null) { |
|
|
|
throw new \Exception('Partner missing'); |
|
|
|
} |
|
|
|
$partner = $this->microMapper->map($dto->partnerIri, Partner::class, [ |
|
|
|
MicroMapperInterface::MAX_DEPTH => 1, |
|
|
|
]); |
|
|
|
if ($dto->product === null) { |
|
|
|
if ($dto->productIri === null) { |
|
|
|
throw new \Exception('Product missing'); |
|
|
|
} |
|
|
|
$product = $this->microMapper->map($dto->productIri, Product::class, [ |
|
|
|
|