mirror of
https://github.com/discourse/discourse.git
synced 2025-04-02 23:09:30 +08:00
Fix broken spec
This commit is contained in:
parent
8fdd6c18fc
commit
e82145cbf9
@ -29,8 +29,10 @@ class EmbedController < ApplicationController
|
|||||||
@posts_left = @topic_view.topic.posts_count - SiteSetting.embed_post_limit - 1
|
@posts_left = @topic_view.topic.posts_count - SiteSetting.embed_post_limit - 1
|
||||||
end
|
end
|
||||||
|
|
||||||
@reply_count = @topic_view.topic.posts_count - 1
|
if @topic_view
|
||||||
@reply_count = 0 if @reply_count < 0
|
@reply_count = @topic_view.topic.posts_count - 1
|
||||||
|
@reply_count = 0 if @reply_count < 0
|
||||||
|
end
|
||||||
|
|
||||||
elsif embed_url.present?
|
elsif embed_url.present?
|
||||||
Jobs.enqueue(:retrieve_topic, user_id: current_user.try(:id), embed_url: embed_url)
|
Jobs.enqueue(:retrieve_topic, user_id: current_user.try(:id), embed_url: embed_url)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user