From d26006f59afb663cf20a31487ea6d4ac01659723 Mon Sep 17 00:00:00 2001 From: salam Date: Mon, 16 Feb 2026 10:22:57 +0100 Subject: [PATCH] wip --- .../Commands/Grapper/Fixtures/FindFixture.php | 3 +-- .../Commands/Grapper/Magloo/Fixtures.php | 17 +++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/Console/Commands/Grapper/Fixtures/FindFixture.php b/app/Console/Commands/Grapper/Fixtures/FindFixture.php index dea5a9b7..e4de4e3f 100644 --- a/app/Console/Commands/Grapper/Fixtures/FindFixture.php +++ b/app/Console/Commands/Grapper/Fixtures/FindFixture.php @@ -7,6 +7,7 @@ use App\Models\Event; use App\Models\EventBookmaker; use App\Models\Mapper; use Illuminate\Support\Carbon; +use Illuminate\Support\Facades\DB; class FindFixture { @@ -119,8 +120,6 @@ class FindFixture if (in_array(Nuh::$options['provider_id'], [5, 6, 9])) { Mapper::updateOrCreate(['event_id' => $event_id], $event); - - return; } /************************************************* diff --git a/app/Console/Commands/Grapper/Magloo/Fixtures.php b/app/Console/Commands/Grapper/Magloo/Fixtures.php index 16a11478..aac478da 100644 --- a/app/Console/Commands/Grapper/Magloo/Fixtures.php +++ b/app/Console/Commands/Grapper/Magloo/Fixtures.php @@ -101,14 +101,15 @@ class Fixtures FindFixture::find($event); - DB::transaction(function () use ($event, $sport_id) { - EventBookmaker::updateOrCreate([ - 'event_id' => $event['id'], - 'sport_id' => $sport_id, - 'bookmaker_id' => Nuh::$options['bookmaker_id'], - ], ['in_feed' => 1, 'bmoid' => $event['event_id'], 'starttime' => $event['starttime']]); - }, 5); - + if (isset($event['id'])) { + DB::transaction(function () use ($event, $sport_id) { + EventBookmaker::updateOrCreate([ + 'event_id' => $event['id'], + 'sport_id' => $sport_id, + 'bookmaker_id' => Nuh::$options['bookmaker_id'], + ], ['in_feed' => 1, 'bmoid' => $event['event_id'], 'starttime' => $event['starttime']]); + }, 5); + } } } }