Commit 04ad266a authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Fix : Erreur de requête pour les responsables de structures sans activité de recherche

parent 195a2caf
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2370,6 +2370,7 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif
            $this->getOscarUserContextService()->getCurrentPerson(),
            true
        );

        if (count($this->organizationsPerimeter) <= 0) {
            throw new UnAuthorizedException();
        }
@@ -2440,6 +2441,11 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif
                $organizationsIdsPerimeter = $this->getActivityService()
                    ->getActivityRepository()
                    ->getIdsWithOrganizations($include);

                // FIX
                if( count($organizationsIdsPerimeter) == 0 ){
                    $organizationsIdsPerimeter = [0];
                }
            }

            // Type de recherche supportée