parent
8de1f7159c
commit
db2d067eec
1 changed files with 2 additions and 4 deletions
|
@ -54,6 +54,8 @@ module Ci
|
||||||
# To prevent db load megabytes of data from trace
|
# To prevent db load megabytes of data from trace
|
||||||
default_scope -> { select(Ci::Build.columns_without_lazy) }
|
default_scope -> { select(Ci::Build.columns_without_lazy) }
|
||||||
|
|
||||||
|
before_destroy { project }
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
def columns_without_lazy
|
def columns_without_lazy
|
||||||
(column_names - LAZY_ATTRIBUTES).map do |column_name|
|
(column_names - LAZY_ATTRIBUTES).map do |column_name|
|
||||||
|
@ -145,10 +147,6 @@ module Ci
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def project
|
|
||||||
commit.project
|
|
||||||
end
|
|
||||||
|
|
||||||
def project_id
|
def project_id
|
||||||
commit.project.id
|
commit.project.id
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue