|
|
@@ -498,8 +498,8 @@ class OrganizationFactory
|
|
|
|
|
|
if ($parent->getSettings()->getProduct() !== SettingsProductEnum::MANAGER) {
|
|
|
throw new \RuntimeException(
|
|
|
- "Parent organization must have the product 'manager' (actual product: " .
|
|
|
- $organizationCreationRequest->getParentId() . ")"
|
|
|
+ "Parent organization must have the product 'manager' (actual product: '" .
|
|
|
+ $parent->getSettings()->getProduct()->value . "')"
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -515,13 +515,6 @@ class OrganizationFactory
|
|
|
if (!preg_match("/FR\d{12}/", $organizationCreationRequest->getIdentifier())) {
|
|
|
throw new \RuntimeException("CMF identifier is missing or invalid.");
|
|
|
}
|
|
|
- if ($this
|
|
|
- ->organizationRepository
|
|
|
- ->count(
|
|
|
- ['identifier' => $organizationCreationRequest->getIdentifier()]
|
|
|
- ) > 0) {
|
|
|
- throw new \RuntimeException("CMF identifier is already registered : '" . $organizationCreationRequest->getIdentifier() ."'");
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
$networkOrganization = new NetworkOrganization();
|
|
|
@@ -734,7 +727,7 @@ class OrganizationFactory
|
|
|
);
|
|
|
|
|
|
if ($response->getStatusCode() !== Response::HTTP_OK) {
|
|
|
- throw new \RuntimeException('An error happened while updating the adminassos database');
|
|
|
+ throw new \RuntimeException('An error happened while updating the adminassos database: ' . $response->getContent());
|
|
|
}
|
|
|
}
|
|
|
|