From da8b6b7f2d478cbe8aa3f430e1748cee005ad796 Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 12 Jan 2023 11:52:27 +0100 Subject: [PATCH] fix: comprueba que hay registros --- modules/mdb/back/methods/mdbVersion/upload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mdb/back/methods/mdbVersion/upload.js b/modules/mdb/back/methods/mdbVersion/upload.js index 5dfe5d3ef..ea88c58f7 100644 --- a/modules/mdb/back/methods/mdbVersion/upload.js +++ b/modules/mdb/back/methods/mdbVersion/upload.js @@ -65,7 +65,7 @@ module.exports = Self => { try { const mdbApp = await models.MdbApp.findById(appName, null, myOptions); - if (mdbApp.locked && mdbApp.userFk != userId) { + if (mdbApp && mdbApp.locked && mdbApp.userFk != userId) { throw new UserError($t('App locked', { userId: mdbApp.userFk }));