diff options
| author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-11-02 12:16:50 +0100 |
|---|---|---|
| committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-12-03 12:04:48 +0100 |
| commit | 303f165cbae8367c19ea273fc52170c2a354a8d6 (patch) | |
| tree | 169d40f5e4f7b31b0f74be2500cfc87601c93c42 /app/models/ci | |
| parent | 61864a5a5bb523953589c9398a431c4369fbfc76 (diff) | |
| download | gitlab-ce-303f165cbae8367c19ea273fc52170c2a354a8d6.tar.gz | |
Fix creation of job_artifact_uploader
Diffstat (limited to 'app/models/ci')
| -rw-r--r-- | app/models/ci/build.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 6d0ebd7f932..8d0c62fcb49 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -15,11 +15,11 @@ module Ci has_one :last_deployment, -> { order('deployments.id DESC') }, as: :deployable, class_name: 'Deployment' has_many :trace_sections, class_name: 'Ci::BuildTraceSection' - has_many :job_artifacts, class_name: 'Ci::JobArtifact', foreign_key: :ci_job_id + # TODO: what to do with dependent destroy + has_many :job_artifacts, class_name: 'Ci::JobArtifact', foreign_key: :ci_job_id, dependent: :destroy has_one :job_archive, -> () { where(file_type: Ci::JobArtifact.file_types[:archive]) }, class_name: 'Ci::JobArtifact', foreign_key: :ci_job_id has_one :job_metadata, -> () { where(file_type: Ci::JobArtifact.file_types[:metadata]) }, class_name: 'Ci::JobArtifact', foreign_key: :ci_job_id - # The "environment" field for builds is a String, and is the unexpanded name def persisted_environment @persisted_environment ||= Environment.find_by( |
