refs #4550 Patch application:
gitea/printnatura/pipeline/head This commit looks good Details

Cannot read property 'method' of undefined
This commit is contained in:
Guillermo Bonet 2022-12-21 08:14:28 +01:00
parent dac7c1071d
commit 0ca0d978f9
1 changed files with 8 additions and 3 deletions

View File

@ -116,7 +116,12 @@ class PrintServer {
try {
// Job data
const [[jobData]] = await conn.query(jobDataQuery, jobId);
let jobData;
// FIXME: Cannot read property 'method' of undefined
for (let a = 0; !jobData && a < 4; a++) {
[[jobData]] = await conn.query(jobDataQuery, jobId);
}
const args = {};
const [res] = await conn.query(jobArgsQuery, jobId);
for (const row of res)
@ -132,8 +137,8 @@ class PrintServer {
});
let pdfData;
for (let attempts = 0; !pdfData && attempts <= 1; attempts++) {
for (let attempts = 0; !pdfData && attempts < 2; attempts++) {
// URL params
const params = {
access_token: this.token,