* fixed the issue with cli command, so it only updates jira cache, where there is an id

This commit is contained in:
Dávid Danyi 2018-09-11 17:57:56 +02:00
parent 8c2b7fe548
commit 9d3fa5fa9d
2 changed files with 3 additions and 3 deletions

View File

@ -36,8 +36,8 @@ class UpdatePageCachesCommand extends Command
$teams = $this->teamService->listTeams(); $teams = $this->teamService->listTeams();
foreach ($teams as $team) { foreach ($teams as $team) {
set_time_limit(30); set_time_limit(30);
if (0 < ($teamId = $team->getId())) { if (null !== $team->getFilterId()) {
$this->jiraCollectorService->getKanbanBoard($teamId,true); $this->jiraCollectorService->getKanbanBoard($team->getId(), true);
} }
} }
} }

View File

@ -69,7 +69,7 @@ class JiraCollectorService
* @param bool $forceReload * @param bool $forceReload
* @return KanbanBoard * @return KanbanBoard
*/ */
public function getKanbanBoard(int $teamId = null, bool $forceReload = false): KanbanBoard public function getKanbanBoard(int $teamId, bool $forceReload = false): KanbanBoard
{ {
$team = $this->teamService->getTeam($teamId); $team = $this->teamService->getTeam($teamId);
$teamName = $team->getName(); $teamName = $team->getName();