diff --git a/config.py b/config.py index aa9041325..2428a9a1e 100644 --- a/config.py +++ b/config.py @@ -47,7 +47,8 @@ class RealTransactions(object): class SQLiteDB(RealTransactions): DB_NAME = 'test/data/test.db' DB_CONNECTION_ARGS = { - 'threadlocals': True + 'threadlocals': True, + 'autorollback': True, } DB_DRIVER = SqliteDatabase @@ -79,6 +80,7 @@ class RDSMySQL(RealTransactions): 'user': 'fluxmonkey', 'passwd': '8eifM#uoZ85xqC^', 'threadlocals': True, + 'autorollback': True, } DB_DRIVER = MySQLDatabase diff --git a/endpoints/api.py b/endpoints/api.py index c77fffbac..3108ce537 100644 --- a/endpoints/api.py +++ b/endpoints/api.py @@ -1580,7 +1580,7 @@ def delete_build_trigger(namespace, repository, trigger_uuid): 'service': trigger.service.name, 'config': config_dict}, repo=model.get_repository(namespace, repository)) - trigger.delete_instance() + trigger.delete_instance(recursive=True) return make_response('No Content', 204) abort(403) # Permission denied