recompute percent completion if needed on load of city stats
This commit is contained in:
parent
b959c695ae
commit
46f8b3f6ab
1 changed files with 14 additions and 8 deletions
|
@ -302,6 +302,12 @@ final class AdminController extends AbstractController
|
|||
$this->addFlash('error', '1 Aucune stats trouvée pour ce code INSEE. Veuillez d\'abord ajouter la ville.');
|
||||
return $this->redirectToRoute('app_admin_import_stats');
|
||||
}
|
||||
|
||||
$completion = $stats->getCompletionPercent();
|
||||
if (!$completion) {
|
||||
$stats->computeCompletionPercent();
|
||||
$completion = $stats->getCompletionPercent();
|
||||
}
|
||||
$followups = $stats->getCityFollowUps();
|
||||
$refresh = false;
|
||||
if (!$followups->isEmpty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue