From 98229d9cd2060c40aa876842e5fbe58f7f27ae44 Mon Sep 17 00:00:00 2001 From: Gerard Date: Thu, 13 Dec 2018 09:09:07 +0100 Subject: [PATCH] commit to test git hooks --- services/loopback/common/models/vn-model.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/loopback/common/models/vn-model.js b/services/loopback/common/models/vn-model.js index 3fb16a57f..17444a7aa 100644 --- a/services/loopback/common/models/vn-model.js +++ b/services/loopback/common/models/vn-model.js @@ -57,12 +57,13 @@ module.exports = function(Self) { promises.push(this.upsertWithWhere(update.where, update.data, options)); await Promise.all(promises); } - if (creates && creates.length) + if (creates && creates.length) { try { await this.create(creates, options); } catch (error) { throw error[error.length - 1]; } + } await transaction.commit(); } catch (error) {