Skip to content

Commit

Permalink
Fix conditions in PeriodRepository
Browse files Browse the repository at this point in the history
  • Loading branch information
749 committed Jan 25, 2020
1 parent 6411f5c commit 7758989
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Repositories/PeriodRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ public function findBy(array $params, array $sort = [], int $limit = null, array
* @param string $endDate
* @return AbstractModel[]
*/
public function findAll(array $sort = [], int $limit = null, array $options = []) : array
public function findAll(array $sort = [], int $limit = null, array $options = []) : array
{
if (isset($options['options']['element']['type'])) {
if (!isset($options['options']['element']['type'])) {
$options['options']['element']['type'] = $this->instance->getCurrentUserType();
}
if (isset($options['options']['element']['id'])) {
$options['options']['element']['type'] = $this->instance->getCurrentUser()->getId();
if (!isset($options['options']['element']['id'])) {
$options['options']['element']['id'] = $this->instance->getCurrentUser()->getId();
}
$data = $this->executionHandler->execute($this, $options);

Expand All @@ -78,4 +78,4 @@ public function findAll(array $sort = [], int $limit = null, array $options = []
return $data;
}

}
}

0 comments on commit 7758989

Please sign in to comment.