From 1735c825726edaa0af5035cb6cbb0cc0db502c6d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Apr 2019 11:28:17 +0200 Subject: Update sequelize --- server/helpers/database-utils.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'server/helpers/database-utils.ts') diff --git a/server/helpers/database-utils.ts b/server/helpers/database-utils.ts index 1005d2cf1..39c74b2fd 100644 --- a/server/helpers/database-utils.ts +++ b/server/helpers/database-utils.ts @@ -62,14 +62,13 @@ function updateInstanceWithAnother > (instanceToUpdate: Model const obj = baseInstance.toJSON() for (const key of Object.keys(obj)) { - instanceToUpdate.set(key, obj[key]) + instanceToUpdate[key] = obj[key] } } function resetSequelizeInstance (instance: Model, savedFields: object) { Object.keys(savedFields).forEach(key => { - const value = savedFields[key] - instance.set(key, value) + instance[key] = savedFields[key] }) } -- cgit v1.2.3