Commit 8b39b8cd authored by Douwe Maan's avatar Douwe Maan

Merge branch 'fix/project-destroy-callbacks' into 'master'

Fix project destroy callback

See gitlab-org/gitlab-ee!107.

See merge request !2307
parents 7884a261 db2d067e
......@@ -54,6 +54,8 @@ class Build < CommitStatus
# To prevent db load megabytes of data from trace
default_scope -> { select(Ci::Build.columns_without_lazy) }
before_destroy { project }
class << self
def columns_without_lazy
(column_names - LAZY_ATTRIBUTES).map do |column_name|
......@@ -145,10 +147,6 @@ def merge_request
end
end
def project
commit.project
end
def project_id
commit.project.id
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment