Only persist a collection item's approval URI once it is verified (#38255)
This commit is contained in:
1 parent
b9d25bde3e
commit
96c93ba835
8 files changed
+24
-23
No files matched your search
@@ -29,7 +29,7 @@ class CollectionItem < ApplicationRecord
|
||||
|
||||
validates :position, numericality: { only_integer: true, greater_than: 0 }
|
||||
validates :activity_uri, presence: true, if: :local_item_with_remote_account?
|
||||
validates :approval_uri, presence: true, unless: -> { local? || account&.local? }
|
||||
validates :approval_uri, presence: true, unless: -> { local? || account&.local? || !accepted? }
|
||||
validates :account, presence: true, if: :accepted?
|
||||
validates :object_uri, presence: true, if: -> { account.nil? }
|
||||
validates :uri, presence: true, if: :remote_item_with_remote_account?
|
||||
|
||||
Reference in new issue
Block a user