Commit 244964d45bc20e9f98914d8ee5998bb0f69956a4

Authored by Arthur Esposte
1 parent c496d9c9

Fix create software task to use the software template

Signed-off-by: Arthur Del Esposte <arthurmde@gmail.com>
Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
Showing 1 changed file with 6 additions and 1 deletions   Show diff stats
lib/create_software.rb
... ... @@ -15,7 +15,12 @@ class CreateSoftware &lt; Task
15 15 end
16 16  
17 17 def perform
18   - community = Community.create!(:name => self.name)
  18 + software_template = Community["software"]
  19 + if (!software_template.blank? && software_template.is_template)
  20 + template_id = software_template.id
  21 + end
  22 +
  23 + community = Community.create!(:name => self.name, :template_id => template_id)
19 24  
20 25 community.environment = self.environment
21 26 community.add_admin(self.requestor)
... ...