Skip to content

Commit

Permalink
Map LastPirepID in Legacy PirepImporter (nabeelio#1809)
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurpar06 authored May 19, 2024
1 parent 6d5684f commit 677f3d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/Services/LegacyImporter/PirepImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 677f3d5

Please sign in to comment.