BURs: remove ability to skip secondary validations.

Remove the ability to skip secondary validations when creating a BUR.
The only skippable validation that still existed was the requirement
that both tags in an implication must have wiki pages. It's now
mandatory to write wiki pages for tags before you can request an
implication. This doesn't apply to empty tags.
This commit is contained in:
evazion
2020-11-12 20:08:13 -06:00
parent 25cba710bf
commit 7f90bc4216
13 changed files with 38 additions and 65 deletions

View File

@@ -1,7 +1,6 @@
class BulkUpdateRequest < ApplicationRecord
attr_accessor :title
attr_accessor :reason
attr_reader :skip_secondary_validations
belongs_to :user
belongs_to :forum_topic, optional: true
@@ -75,7 +74,7 @@ class BulkUpdateRequest < ApplicationRecord
transaction do
CurrentUser.scoped(approver) do
processor.process!(approver)
update!(status: "approved", approver: approver, skip_secondary_validations: true)
update!(status: "approved", approver: approver)
forum_updater.update("The #{bulk_update_request_link} (forum ##{forum_post.id}) has been approved by @#{approver.name}.")
end
end
@@ -120,10 +119,6 @@ class BulkUpdateRequest < ApplicationRecord
self.tags = processor.affected_tags
end
def skip_secondary_validations=(v)
@skip_secondary_validations = v.to_s.truthy?
end
def processor
@processor ||= BulkUpdateRequestProcessor.new(self)
end