FIX: if post creation fails, raise an exception
This commit is contained in:
parent
2b2ae4bfe7
commit
34122e06df
|
@ -67,6 +67,10 @@ class QueuedPost < ActiveRecord::Base
|
|||
creator = PostCreator.new(user, create_options.merge(skip_validations: true))
|
||||
created_post = creator.create
|
||||
|
||||
unless created_post && creator.errors.blank?
|
||||
raise StandardError, "Failed to create post #{raw[0..100]} #{creator.errors}"
|
||||
end
|
||||
|
||||
if user.blocked?
|
||||
user.update_columns(blocked: false)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue