Commit e8fdb7153e81505588ab1bca76b20a13e676e8bd
1 parent
61e9587f
Exists in
sisp_simple_version
Set sisp_template on import_sisp_software task
Signed-off-by: Luciano Prestes Cavalcanti <lucianopcbr@gmail.com>
Showing
1 changed file
with
3 additions
and
4 deletions
Show diff stats
src/noosfero-spb/software_communities/lib/tasks/import_sisp_software.rake
| @@ -31,6 +31,8 @@ namespace :software do | @@ -31,6 +31,8 @@ namespace :software do | ||
| 31 | 31 | ||
| 32 | $created_software={} | 32 | $created_software={} |
| 33 | 33 | ||
| 34 | + $sisp_template = Community.find_by_identifier("sisp-software") | ||
| 35 | + | ||
| 34 | print 'Creating SISP Softwares: ' | 36 | print 'Creating SISP Softwares: ' |
| 35 | $imported_data.keys.each do |key| | 37 | $imported_data.keys.each do |key| |
| 36 | 38 | ||
| @@ -74,11 +76,8 @@ def create_sisp_community name | @@ -74,11 +76,8 @@ def create_sisp_community name | ||
| 74 | community = Community.find_or_initialize_by_name(name) | 76 | community = Community.find_or_initialize_by_name(name) |
| 75 | 77 | ||
| 76 | community.identifier = identifier | 78 | community.identifier = identifier |
| 79 | + community.template = $sisp_template | ||
| 77 | 80 | ||
| 78 | - #p "achei? #{!community.id.nil?}" | ||
| 79 | - #p "nome: #{name}" | ||
| 80 | - #p "iden: #{identifier}" | ||
| 81 | - #p " " | ||
| 82 | community.save! | 81 | community.save! |
| 83 | community | 82 | community |
| 84 | end | 83 | end |