diff options
Diffstat (limited to 'app/models/approval.rb')
-rw-r--r-- | app/models/approval.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/approval.rb b/app/models/approval.rb index 9ded44fe425..ecc15077c8d 100644 --- a/app/models/approval.rb +++ b/app/models/approval.rb @@ -3,10 +3,13 @@ class Approval < ApplicationRecord include CreatedAtFilterable include Importable + include ShaAttribute belongs_to :user belongs_to :merge_request + sha_attribute :patch_id_sha + validates :merge_request_id, presence: true, unless: :importing? validates :user_id, presence: true, uniqueness: { scope: [:merge_request_id] } |