Commit 9984b8c246948f46e302a43dcc377d9ff656bba6
1 parent
2079fa79
Exists in
master
and in
22 other branches
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 | 25 | |
| 26 | 26 | def article_object |
| 27 | 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 | 29 | if requestor.present? |
| 30 | 30 | @article_object.author = requestor |
| 31 | 31 | else | ... | ... |