From b0f4322abb656c787554eb6f709ba39a7c69290a Mon Sep 17 00:00:00 2001 From: Marty Chong Date: Tue, 28 Nov 2017 16:43:54 -0800 Subject: [PATCH 1/3] To fix #43 - Accounts cant be deleted --- backend/cloud_inquisitor/plugins/commands/accounts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/cloud_inquisitor/plugins/commands/accounts.py b/backend/cloud_inquisitor/plugins/commands/accounts.py index e4de9fe..22abdb1 100644 --- a/backend/cloud_inquisitor/plugins/commands/accounts.py +++ b/backend/cloud_inquisitor/plugins/commands/accounts.py @@ -69,7 +69,8 @@ def run(self, **kwargs): if acct: cfm = 'Are you absolutely sure you wish to delete the account named {}'.format(acct.account_name) if confirm(cfm): - acct.delete() + db.session.delete(acct) + db.session.commit() self.log.info('Account {0} has been deleted'.format(kwargs['account_name'])) else: self.log.info('Failed to verify account name, not deleting') From f44b37cf7da44fc6c65e3dfa37be50560ab12af1 Mon Sep 17 00:00:00 2001 From: Marty Chong Date: Tue, 28 Nov 2017 17:31:10 -0800 Subject: [PATCH 2/3] Revert "To fix #43 - Accounts cant be deleted" This reverts commit b0f4322abb656c787554eb6f709ba39a7c69290a. --- backend/cloud_inquisitor/plugins/commands/accounts.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/cloud_inquisitor/plugins/commands/accounts.py b/backend/cloud_inquisitor/plugins/commands/accounts.py index 22abdb1..e4de9fe 100644 --- a/backend/cloud_inquisitor/plugins/commands/accounts.py +++ b/backend/cloud_inquisitor/plugins/commands/accounts.py @@ -69,8 +69,7 @@ def run(self, **kwargs): if acct: cfm = 'Are you absolutely sure you wish to delete the account named {}'.format(acct.account_name) if confirm(cfm): - db.session.delete(acct) - db.session.commit() + acct.delete() self.log.info('Account {0} has been deleted'.format(kwargs['account_name'])) else: self.log.info('Failed to verify account name, not deleting') From 31aa632e63f44b5e8b99091eceae70d6556b75df Mon Sep 17 00:00:00 2001 From: Marty Chong Date: Tue, 28 Nov 2017 17:32:11 -0800 Subject: [PATCH 3/3] Clarifying DB requirements --- docs/additional_options.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/additional_options.rst b/docs/additional_options.rst index 5906f86..d446a00 100644 --- a/docs/additional_options.rst +++ b/docs/additional_options.rst @@ -2,6 +2,8 @@ Databases --------- +cinq is currently designed to run with MySQL Version 5.7.17. We recommend you stick to this version. + If you do not wish to use a local MySQL DB that the cinq install gives you, in your variables file, simply set the following in your variables before you run the packer build to disable the install and setup of the local DB and point to the database you'd like to use ::