[noosfero/noosfero][master] Fix suggest article tests
Victor Costa
gitlab at gitlab.com
Mon May 25 17:28:26 BRT 2015
Victor Costa pushed to branch master at Noosfero / noosfero
Commits:
9984b8c2 by Victor Costa at 2015-05-25T17:28:10Z
Fix suggest article tests
- - - - -
1 changed file:
- app/models/suggest_article.rb
Changes:
=====================================
app/models/suggest_article.rb
=====================================
--- a/app/models/suggest_article.rb
+++ b/app/models/suggest_article.rb
@@ -25,7 +25,7 @@ class SuggestArticle < Task
def article_object
if @article_object.nil?
- @article_object = article_type.new(article.merge({:profile => target}).except(:type))
+ @article_object = article_type.new(article.merge(target.present? ? {:profile => target} : {}).except(:type))
if requestor.present?
@article_object.author = requestor
else
View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/9984b8c246948f46e302a43dcc377d9ff656bba6
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150525/c13ef687/attachment.html>
More information about the Noosfero-dev
mailing list