Verified Commit 87e8ba0f authored by Tim Vis茅e's avatar Tim Vis茅e
Browse files

Fix query error in balance update logic

parent 929d743b
Pipeline #192145625 passed with stage
in 5 minutes and 28 seconds
......@@ -10,7 +10,6 @@ use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Mail;
* Check for each user whether a new balance update should be sent, and in that
......@@ -86,8 +85,8 @@ class SendBalanceUpdates implements ShouldQueue {
$users->each(function($user) {
DB::transaction(function() use($user) {
// Find the email history entry
$email_history = EmailHistory::user($user)
$email_history = EmailHistory::where('user_id', $user->id)
->where('type', EmailHistory::TYPE_BALANCE_UPDATE)
// Create new entry if non existant
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment