mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
skip validations for Spam Rules when needed
This commit is contained in:
+1
-1
@@ -76,7 +76,7 @@ class PostCreator
|
||||
{ user: @user,
|
||||
limit_once_per: 24.hours,
|
||||
message_params: {domains: @post.linked_hosts.keys.join(', ')} } )
|
||||
elsif @post && !@post.errors.present?
|
||||
elsif @post && !@post.errors.present? && !@opts[:skip_validations]
|
||||
SpamRulesEnforcer.enforce!(@post)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user