diff --git a/app/Services/LegacyImporter/PirepImporter.php b/app/Services/LegacyImporter/PirepImporter.php index 174fa7625..b9ecd11bc 100644 --- a/app/Services/LegacyImporter/PirepImporter.php +++ b/app/Services/LegacyImporter/PirepImporter.php @@ -136,6 +136,12 @@ public function run($start = 0) $count++; } + if ($pirep->user && $pirep->state === PirepState::ACCEPTED) { + $pirep->user->update([ + 'last_pirep_id' => $pirep->id, + ]); + } + if (!$pirep->airline || !$pirep->airline->journal) { continue; }