Skip to content

Commit

Permalink
Save correct service entry id in database (#1078)
Browse files Browse the repository at this point in the history
  • Loading branch information
dennis531 authored Nov 25, 2024
1 parent 93a8335 commit e2f4991
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Models/Playlists.php
Original file line number Diff line number Diff line change
Expand Up @@ -619,13 +619,13 @@ public function setEntries(Array $entries)
$playlist_video = PlaylistVideos::create([
'video_id' => $db_video->id,
'playlist_id' => $this->id,
'service_entry_id' => isset($entry->id) ?: null,
'service_entry_id' => $entry->id ?? null,
]);
}

if (!is_null($playlist_video)) {
// Always update entry id and order
$playlist_video->service_entry_id = isset($entry->id) ?: null;
$playlist_video->service_entry_id = $entry->id ?? null;
$playlist_video->order = $key;
$playlist_video->store();
}
Expand Down

0 comments on commit e2f4991

Please sign in to comment.