db/seeds.d/75-job_templates.rb in katello-3.15.3.1 vs db/seeds.d/75-job_templates.rb in katello-3.16.0.rc1
- old
+ new
@@ -10,11 +10,11 @@
template = JobTemplate.import_raw!(File.read(template), :default => true, :locked => true, :update => sync)
else
template = JobTemplate.import!(File.read(template), :default => true, :locked => true, :update => sync)
end
- template.organizations << Organization.unscoped.all if template && template.organizations.empty?
- template.locations << Location.unscoped.all if template && template.locations.empty?
+ template.organizations << Organization.unscoped.all if template&.organizations&.empty?
+ template.locations << Location.unscoped.all if template&.locations&.empty?
end
end
end
end