Fix the trigger delete code and enable peewee autorollback.
This commit is contained in:
parent
0d4c66312b
commit
f8a1535e78
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in a new issue