Skip to content

Commit

Permalink
Fixed bug in the statistics distribution diagram, transferring string…
Browse files Browse the repository at this point in the history
… values instead of integers (#3537)
  • Loading branch information
magicsunday committed Jan 8, 2021
1 parent 8ce3bd7 commit 936d28c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/Statistics/Repository/PlaceRepository.php
Expand Up @@ -165,7 +165,14 @@ public function statsPlaces(string $what = 'ALL', string $fact = '', int $parent
});
}

return $query->get()->all();
return $query
->get()
->map(static function (stdClass $entry) {
// Map total value to integer
$entry->tot = (int) $entry->tot;
return $entry;
})
->all();
}

/**
Expand Down

0 comments on commit 936d28c

Please sign in to comment.