Commit 9984b8c246948f46e302a43dcc377d9ff656bba6

Authored by Victor Costa
1 parent 2079fa79

Fix suggest article tests

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/suggest_article.rb
@@ -25,7 +25,7 @@ class SuggestArticle < Task @@ -25,7 +25,7 @@ class SuggestArticle < Task
25 25
26 def article_object 26 def article_object
27 if @article_object.nil? 27 if @article_object.nil?
28 - @article_object = article_type.new(article.merge({:profile => target}).except(:type)) 28 + @article_object = article_type.new(article.merge(target.present? ? {:profile => target} : {}).except(:type))
29 if requestor.present? 29 if requestor.present?
30 @article_object.author = requestor 30 @article_object.author = requestor
31 else 31 else