mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 13:17:08 +00:00
Fix returning next planned sequence number.
If no sequences have been shot, return 1 instead of null as the next available sequence number. Fixes #125.
This commit is contained in:
@@ -36,7 +36,9 @@ async function getSequence (client) {
|
||||
`;
|
||||
|
||||
const res = await client.query(text);
|
||||
return res.rows[0] && res.rows[0].sequence;
|
||||
// If no sequences have been found, assume none have been shot
|
||||
// and return 1
|
||||
return (res.rows[0] && res.rows[0].sequence) || 1;
|
||||
}
|
||||
|
||||
async function getTimestamps (client, projectId, payload) {
|
||||
|
||||
Reference in New Issue
Block a user