Skip to content

Commit

Permalink
Merge pull request #1674 from PyRowMan/fix-api-search
Browse files Browse the repository at this point in the history
Fix conditional check for release object in API controller
  • Loading branch information
DariusIII authored Dec 18, 2024
2 parents 07171fa + c5249c9 commit c6fe4b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ function ($release) {
UserRequest::addApiRequest($apiKey, $request->getRequestUri());
$rel = Release::query()->where('guid', $request->input('id'))->first(['id', 'searchname']);

if ($rel->isNotEmpty()) {
if ($rel && $rel->isNotEmpty()) {
$data = ReleaseNfo::getReleaseNfo($rel->id);
if (! empty($data)) {
if ($request->has('o') && $request->input('o') === 'file') {
Expand Down

0 comments on commit c6fe4b6

Please sign in to comment.