Commit 4f296953 authored by Mehmet Emin INAC's avatar Mehmet Emin INAC

Remove `project_id` delegation from the `Ci::Pipeline` model

Delegating the `project_id` to `project` relation of the `Ci::Pipeline`
requires ActiveRecord to load the object from the database. Since we
already have the `project_id` foreign key on `Ci::Pipeline` we can just
use the value stored in that column.
parent c9f1648c
......@@ -104,7 +104,6 @@ module Ci
accepts_nested_attributes_for :variables, reject_if: :persisted?
delegate :id, to: :project, prefix: true
delegate :full_path, to: :project, prefix: true
validates :sha, presence: { unless: :importing? }
......
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