refs #5000 remove consolelog
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Andrés 2023-03-08 12:36:53 +01:00
parent b6e993dadf
commit 32429a58e0
3 changed files with 1 additions and 3 deletions

View File

@ -44,7 +44,7 @@ module.exports = Self => {
try { try {
const invoiceOut = await Self.findById(id, null, myOptions); const invoiceOut = await Self.findById(id, null, myOptions);
const hasInvoicing = await models.Account.hasRole(userId, 'invoicing', myOptions); const hasInvoicing = await models.Account.hasRole(userId, 'invoicing', myOptions);
console.log(invoiceOut, !hasInvoicing);
if (invoiceOut.hasPdf && !hasInvoicing) if (invoiceOut.hasPdf && !hasInvoicing)
throw new UserError(`You don't have enough privileges`); throw new UserError(`You don't have enough privileges`);

View File

@ -47,7 +47,6 @@ module.exports = Self => {
ids = ids.split(','); ids = ids.split(',');
for (let id of ids) { for (let id of ids) {
console.log(zipConfig, totalSize, zipConfig ? zipConfig.maxSize : null);
if (zipConfig && totalSize > zipConfig.maxSize) throw new UserError('Files are too large'); if (zipConfig && totalSize > zipConfig.maxSize) throw new UserError('Files are too large');
const invoiceOutPdf = await models.InvoiceOut.download(ctx, id, myOptions); const invoiceOutPdf = await models.InvoiceOut.download(ctx, id, myOptions);
const fileName = extractFileName(invoiceOutPdf[2]); const fileName = extractFileName(invoiceOutPdf[2]);

View File

@ -65,7 +65,6 @@ describe('InvoiceOut filter()', () => {
await invoiceOut.updateAttribute('hasPdf', true, options); await invoiceOut.updateAttribute('hasPdf', true, options);
const result = await models.InvoiceOut.filter(ctx, {id: invoiceOut.id}, options); const result = await models.InvoiceOut.filter(ctx, {id: invoiceOut.id}, options);
console.log(result);
expect(result.length).toEqual(1); expect(result.length).toEqual(1);