fixed updateFile transaction
gitea/salix/master This commit looks good Details

This commit is contained in:
Joan Sanchez 2019-07-16 13:55:24 +02:00
parent 3d52c83d39
commit 5e40b384ff
1 changed files with 2 additions and 2 deletions

View File

@ -79,10 +79,10 @@ module.exports = Self => {
}, myOptions); }, myOptions);
if (hasAttachedFile) if (hasAttachedFile)
updatedDms = await uploadNewFile(ctx, dms, myOptions); await uploadNewFile(ctx, dms, myOptions);
if (tx) await tx.commit(); if (tx) await tx.commit();
return updatedDms; return dms;
} catch (e) { } catch (e) {
if (tx) await tx.rollback(); if (tx) await tx.rollback();
throw e; throw e;