Skip to content

Commit

Permalink
fix: updated total molecules query
Browse files Browse the repository at this point in the history
  • Loading branch information
CS76 committed Aug 20, 2024
1 parent 7f31573 commit 8f68374
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Console/Commands/DashWidgetsRefresh.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function handle()
$this->info('Cache for molecules parent refreshed.');

Cache::rememberForever('stats.molecules', function () {
return DB::table('molecules')->selectRaw('count(*)')->whereRaw('has_stereo=false and is_parent=false and active=true')->get()[0]->count + DB::table('molecules')->selectRaw('count(*)')->whereRaw('has_stereo=true and active=true')->get()[0]->count;
return DB::table('molecules')->selectRaw('count(*)')->whereRaw('active=true and NOT (is_parent=true AND has_variants=true)')->get()[0]->count;
});
$this->info('Cache for molecules refreshed.');

Expand Down

0 comments on commit 8f68374

Please sign in to comment.