models: explicitly mark optional belongs_to
relationship as so
This prepares making the `belongs_to` relationship required by default.
This commit is contained in:
parent
31dfdbf993
commit
11456109c0
9 changed files with 14 additions and 14 deletions
|
@ -66,9 +66,9 @@ class Procedure < ApplicationRecord
|
|||
has_one :module_api_carto, dependent: :destroy
|
||||
has_one :attestation_template, dependent: :destroy
|
||||
|
||||
belongs_to :parent_procedure, class_name: 'Procedure'
|
||||
belongs_to :canonical_procedure, class_name: 'Procedure'
|
||||
belongs_to :service
|
||||
belongs_to :parent_procedure, class_name: 'Procedure', optional: true
|
||||
belongs_to :canonical_procedure, class_name: 'Procedure', optional: true
|
||||
belongs_to :service, optional: true
|
||||
|
||||
def active_revision
|
||||
brouillon? ? draft_revision : published_revision
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue