From 99db4b235d6fcf32779ebe60444d1b3e76429c61 Mon Sep 17 00:00:00 2001 From: Blaine Price <1wbprice@gmail.com> Date: Mon, 8 Feb 2016 15:33:11 -0500 Subject: [PATCH] Remove count check guard. --- api/hooks/permissions/index.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/api/hooks/permissions/index.js b/api/hooks/permissions/index.js index 18d24b9..4f83325 100644 --- a/api/hooks/permissions/index.js +++ b/api/hooks/permissions/index.js @@ -43,19 +43,10 @@ class Permissions extends Marlinspike { }) this.sails.after('hook:orm:loaded', () => { - sails.models.model.count() - .then(count => { - if (count === _.keys(this.sails.models).length) return next() - - return this.initializeFixtures() - .then(() => { - next() - }) - }) - .catch(error => { - this.sails.log.error(error) - next(error) - }) + return this.initializeFixtures() + .then(() => { + next() + }) }) }