The previous order of removing triggers and their push keys violated a DB constraint.
This commit is contained in:
parent
0fcb7da6a1
commit
268c28649a
1 changed files with 2 additions and 1 deletions
|
@ -81,10 +81,11 @@ class BuildTrigger(RepositoryParamResource):
|
|||
'service': trigger.service.name, 'config': config_dict},
|
||||
repo=model.get_repository(namespace, repository))
|
||||
|
||||
trigger.delete_instance(recursive=True)
|
||||
|
||||
if trigger.write_token is not None:
|
||||
trigger.write_token.delete_instance()
|
||||
|
||||
trigger.delete_instance(recursive=True)
|
||||
return 'No Content', 204
|
||||
|
||||
|
||||
|
|
Reference in a new issue