fix: Fix bug reported by the tests.

This commit is contained in:
Pol Dellaiera 2021-11-18 12:03:49 +01:00
parent a32692c37a
commit f9d36cc8a9
No known key found for this signature in database
GPG Key ID: D476DFE9C67467CA
2 changed files with 2 additions and 3 deletions

View File

@ -79,8 +79,7 @@ class TimelineActivityProvider implements TimelineProviderInterface
$metadataActivity = $this->em->getClassMetadata(Activity::class);
$associationMapping = $metadataActivity->getAssociationMapping('person');
$role = new Role('CHILL_ACTIVITY_SEE');
$reachableScopes = $this->helper->getReachableScopes($this->user,
$role, $person->getCenter());
$reachableScopes = $this->helper->getReachableScopes($this->user, $role->getRole(), $person->getCenter());
$whereClause = sprintf(' {activity.person_id} = ? AND {activity.scope_id} IN ({scopes_ids}) ');
$scopes_ids = [];

View File

@ -63,7 +63,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private int $id;
private ?int $id = null;
/**
* The person's first name