mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Make polls work better on multi-language forums.
This commit is contained in:
@@ -33,7 +33,7 @@ after_initialize do
|
||||
|
||||
post = Post.find(params[:post_id])
|
||||
poll = PollPlugin::Poll.new(post)
|
||||
unless poll.is_poll?
|
||||
unless poll.has_poll_details?
|
||||
render status: 400, json: false
|
||||
return
|
||||
end
|
||||
@@ -102,7 +102,7 @@ after_initialize do
|
||||
PollPlugin::Poll.new(object).serialize(scope.user)
|
||||
end
|
||||
def include_poll_details?
|
||||
PollPlugin::Poll.new(object).is_poll?
|
||||
PollPlugin::Poll.new(object).has_poll_details?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user