Skip to content

Commit

Permalink
Merge pull request #179 from puzzledmonkey/1.3
Browse files Browse the repository at this point in the history
Fix for Nova 4.35.0
  • Loading branch information
patrickbrouwers authored Aug 19, 2024
2 parents fee2e1b + 1a7ffe9 commit 976a574
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Requests/ExportLensActionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public function toExportQuery()
$groups = $query->getQuery()->groups;

is_array($groups) && 1 === count($groups)
? $query->whereIn($groups[0], explode(',', $this->resources))
: $query->whereKey(explode(',', $this->resources));
? $query->whereIn($groups[0], is_array($this->resources) ? $this->resources : explode(',', $this->resources))
: $query->whereKey(is_array($this->resources) ? $this->resources : explode(',', $this->resources));
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/Requests/ExportResourceActionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ExportResourceActionRequest extends ActionRequest implements ExportActionR
public function toExportQuery()
{
return $this->toSelectedResourceQuery()->when(!$this->forAllMatchingResources(), function ($query) {
$query->whereKey(explode(',', $this->resources));
$query->whereKey(is_array($this->resources) ? $this->resources : explode(',', $this->resources));
});
}

Expand Down

0 comments on commit 976a574

Please sign in to comment.