diff options
Diffstat (limited to 'app/models/ci/build.rb')
-rw-r--r-- | app/models/ci/build.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 41446946a5e..1a2292b4a20 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -376,6 +376,10 @@ module Ci trace.exist? end + def has_old_trace? + old_trace.present? + end + def trace=(data) raise NotImplementedError end @@ -385,6 +389,8 @@ module Ci end def erase_old_trace! + raise Gitlab::Ci::Trace::EraseError, 'Old trace does not exist' unless has_old_trace? + update_column(:trace, nil) end |