mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Polls didn't work in imported posts
Imports skip validation of posts, but polls are only created during the validation phase.
This commit is contained in:
@@ -476,7 +476,8 @@ class PostCreator
|
||||
|
||||
def save_post
|
||||
@post.disable_rate_limits! if skip_validations?
|
||||
saved = @post.save(validate: !skip_validations?)
|
||||
@post.skip_validation = skip_validations?
|
||||
saved = @post.save
|
||||
rollback_from_errors!(@post) unless saved
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user