fixed export empty ids issue

This commit is contained in:
Cihan Şentürk 2024-05-22 21:37:42 +03:00 committed by GitHub
parent 99e82f51de
commit 8455da09f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ abstract class Model extends Eloquent implements Ownable
$limit = (int) $request->get('limit', setting('default.list_limit', '25')); $limit = (int) $request->get('limit', setting('default.list_limit', '25'));
$offset = $page ? ($page - 1) * $limit : 0; $offset = $page ? ($page - 1) * $limit : 0;
if (! $this instanceof WithParentSheet && count((array) $ids) < $limit) { if (! $this instanceof WithParentSheet && (empty($ids) || count((array) $ids) > $limit)) {
$query->offset($offset)->limit($limit); $query->offset($offset)->limit($limit);
} }