mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-10 13:16:09 +10:00
Merge branch 'fix/project-destroy-callbacks' into 'master'
Fix project destroy callback See gitlab-org/gitlab-ee!107. See merge request !2307
This commit is contained in:
@@ -54,6 +54,8 @@ module Ci
|
||||
# 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 @@ module Ci
|
||||
end
|
||||
end
|
||||
|
||||
def project
|
||||
commit.project
|
||||
end
|
||||
|
||||
def project_id
|
||||
commit.project.id
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user