|
|
@@ -10,6 +10,7 @@ use App\Enum\Organization\PrincipalTypeEnum;
|
|
|
use App\Service\Network\Tree;
|
|
|
use App\Service\Organization\Utils as OrganizationUtils;
|
|
|
use App\Service\Security\Module;
|
|
|
+use App\Service\Utils\DatesUtils;
|
|
|
use App\Test\Service\Organization\OrganizationProfileCreatorTest;
|
|
|
|
|
|
/**
|
|
|
@@ -43,7 +44,10 @@ class OrganizationProfileCreator
|
|
|
);
|
|
|
|
|
|
foreach ($organization->getNetworkOrganizations() as $networkOrganization) {
|
|
|
- $organizationProfile->addNetwork($networkOrganization->getNetwork()->getName());
|
|
|
+ // TODO: fix temporaire => retirer ce 'if' dès la résolution de https://ressources-opentalent.atlassian.net/browse/V8-6985
|
|
|
+ if ($networkOrganization->getEndDate() === null || $networkOrganization->getEndDate() > DatesUtils::new()) {
|
|
|
+ $organizationProfile->addNetwork($networkOrganization->getNetwork()->getName());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/** @var Organization $parent */
|