Skip to content

Commit

Permalink
Merge pull request #8731 from DavidKang/fix-8729-delete-staging-project
Browse files Browse the repository at this point in the history
Destroy Staging Workflow when we destroy the main project
  • Loading branch information
coolo committed Nov 19, 2019
2 parents acc8feb + 268e2b1 commit 7d32c33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def autocomplete(search)
has_many :target_of_bs_request_actions, class_name: 'BsRequestAction', foreign_key: 'target_project_id'
has_many :target_of_bs_requests, through: :target_of_bs_request_actions, source: :bs_request

has_one :staging, class_name: 'Staging::Workflow', inverse_of: :project
has_one :staging, class_name: 'Staging::Workflow', inverse_of: :project, dependent: :destroy

default_scope { where('projects.id not in (?)', Relationship.forbidden_project_ids) }

Expand Down

0 comments on commit 7d32c33

Please sign in to comment.