mirror of
https://codeberg.org/SeedDMS/paperless
synced 2025-02-06 06:55:28 +00:00
ordering by asn uses document id
This commit is contained in:
parent
59084a1ddd
commit
ae0d06f1ef
|
@ -448,6 +448,9 @@ class SeedDMS_ExtPaperless_RestAPI_Controller { /* {{{ */
|
||||||
$query = $params['title__icontains'];
|
$query = $params['title__icontains'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$limit = isset($params['page_size']) ? (int) $params['page_size'] : 25;
|
||||||
|
$page = (isset($params['page']) && $params['page'] > 0) ? (int) $params['page'] : 1;
|
||||||
|
|
||||||
$order = [];
|
$order = [];
|
||||||
if (isset($params["ordering"]) && is_string($params["ordering"])) {
|
if (isset($params["ordering"]) && is_string($params["ordering"])) {
|
||||||
if($params["ordering"][0] == '-') {
|
if($params["ordering"][0] == '-') {
|
||||||
|
@ -461,6 +464,8 @@ class SeedDMS_ExtPaperless_RestAPI_Controller { /* {{{ */
|
||||||
$order['by'] = $orderfield;
|
$order['by'] = $orderfield;
|
||||||
elseif($orderfield == 'added')
|
elseif($orderfield == 'added')
|
||||||
$order['by'] = 'created';
|
$order['by'] = 'created';
|
||||||
|
elseif($orderfield == 'archive_serial_number')
|
||||||
|
$order['by'] = 'id';
|
||||||
}
|
}
|
||||||
|
|
||||||
// category
|
// category
|
||||||
|
|
Loading…
Reference in New Issue
Block a user