Simplify relation between a build and metadata
This removes erroneously defined polymorphic association, because specifying `belongs_to` relationship with a class that already supports polymorphic associations works out-of-the-box.
This commit is contained in:
parent
d434af46f4
commit
9f307421a7
1 changed files with 1 additions and 3 deletions
|
@ -10,9 +10,7 @@ module Ci
|
|||
|
||||
self.table_name = 'ci_builds_metadata'
|
||||
|
||||
belongs_to :build, class_name: 'CommitStatus',
|
||||
polymorphic: true, # rubocop:disable Cop/PolymorphicAssociations
|
||||
inverse_of: :metadata
|
||||
belongs_to :build, class_name: 'CommitStatus'
|
||||
belongs_to :project
|
||||
|
||||
before_create :set_build_project
|
||||
|
|
Loading…
Reference in a new issue