diff options
| author | horus | 2020-12-17 17:36:10 +0100 |
|---|---|---|
| committer | horus | 2020-12-17 17:36:10 +0100 |
| commit | 3f0c4e74b919ba658ac7c1a0a08594b75bc461d7 (patch) | |
| tree | cbf37160f77e37d8ad01bb5bde025e3b9e5c2322 | |
| parent | 296f4d0c3834a4e4cac08e274c7ae36fffc05ec9 (diff) | |
| download | senpai-3f0c4e74b919ba658ac7c1a0a08594b75bc461d7.tar.gz | |
bugfix
| -rw-r--r-- | app/Http/Controllers/AnimeController.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/Http/Controllers/AnimeController.php b/app/Http/Controllers/AnimeController.php index 32f6556..0a3d3b4 100644 --- a/app/Http/Controllers/AnimeController.php +++ b/app/Http/Controllers/AnimeController.php @@ -106,7 +106,9 @@ class AnimeController extends Controller { $anime["chart_label"] = $created_at; - $anime["calculated_score"] = $calculated_score; + if ( 0 != $stats->scored_by ) { + $anime["calculated_score"] = $calculated_score; + } $anime["basic_data"] = DB::select('select score, rank, popularity, members, favorites from anime join stats on stats.id = ( select id from stats where anime.mal_id = stats.mal_id order by created_at desc limit 1) where anime.mal_id = ?', [$mal_id])[0]; |
