mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 08:47:07 +00:00
Change handling of sequence parameter.
Allow `null` to be used in addition to `0` in db.sequence.get() to return all sequences.
This commit is contained in:
@@ -31,7 +31,7 @@ async function get (projectId, sequence, opts = {}) {
|
||||
const offset = Math.abs(opts.offset) || Math.abs((opts.page-1)*opts.itemsPerPage) || 0;
|
||||
const limit = Math.abs(opts.limit) || Math.abs(Number(opts.itemsPerPage)) || null;
|
||||
|
||||
const restriction = sequence != 0
|
||||
const restriction = sequence
|
||||
? "sequence = $3"
|
||||
: "TRUE OR $3";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user