Commit 37462662 authored by Enrique García Cota's avatar Enrique García Cota

fixed License -> Licence issue in tasks/licenses

parent 369f984e
...@@ -33,10 +33,10 @@ namespace :licenses do ...@@ -33,10 +33,10 @@ namespace :licenses do
desc "associates projects to the licenses they belong to" desc "associates projects to the licenses they belong to"
task :link => :environment do task :link => :environment do
license_custom_field_id = CustomField.find_by_type_and_name("ProjectCustomField", "License").id license_custom_field_id = CustomField.find_by_type_and_name("ProjectCustomField", "Licence").id
["GPL", "LGPL", "TAPR OHL", "CERN OHL"].each do |license_name| ["GPL", "LGPL", "TAPR OHL", "CERN OHL"].each do |license_name|
license = License.find_by_name(license_name) license = License.find_by_short_name(license_name)
license_version = license.versions.first license_version = license.versions.first
Project.with_custom_values(license_custom_field_id => license_name).each do |p| Project.with_custom_values(license_custom_field_id => license_name).each do |p|
writable_p = Project.find( writable_p = Project.find(
...@@ -47,8 +47,8 @@ namespace :licenses do ...@@ -47,8 +47,8 @@ namespace :licenses do
end end
desc "removes the previous custom field" desc "removes the previous custom field"
task :remove_custom_field do task :remove_custom_field => :environment do
CustomField.destroy_all(:type => "ProjectCustomField", :name => "License") CustomField.destroy_all(:type => "ProjectCustomField", :name => "Licence")
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment