refs #4550 Fixed bug: not ended transaction

This commit is contained in:
Guillermo Bonet 2022-11-28 09:06:16 +01:00
parent 4aacee1133
commit ce1312fdf1
1 changed files with 4 additions and 1 deletions

View File

@ -86,7 +86,10 @@ class PrintServer {
try {
await conn.beginTransaction();
[[printJob]] = await conn.query(selectQuery, ['LabelCollection', this.conf.printers]);
if (!printJob) return;
if (!printJob) {
conn.rollback();
return;
}
jobId = printJob.id;
this.method = printJob.method;