mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Fix broken spec
This commit is contained in:
parent
8fdd6c18fc
commit
e82145cbf9
1 changed files with 4 additions and 2 deletions
|
@ -29,8 +29,10 @@ class EmbedController < ApplicationController
|
|||
@posts_left = @topic_view.topic.posts_count - SiteSetting.embed_post_limit - 1
|
||||
end
|
||||
|
||||
@reply_count = @topic_view.topic.posts_count - 1
|
||||
@reply_count = 0 if @reply_count < 0
|
||||
if @topic_view
|
||||
@reply_count = @topic_view.topic.posts_count - 1
|
||||
@reply_count = 0 if @reply_count < 0
|
||||
end
|
||||
|
||||
elsif embed_url.present?
|
||||
Jobs.enqueue(:retrieve_topic, user_id: current_user.try(:id), embed_url: embed_url)
|
||||
|
|
Loading…
Reference in a new issue