Forgot to make this work with the new Report.create_from_yaml method.

Paired-with: Nick Lewis

Signed-off-by: Matt Robinson <[email protected]>
---
Local-branch: ticket/next/5543
 lib/tasks/import_reports.rake |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/tasks/import_reports.rake b/lib/tasks/import_reports.rake
index e13250f..4e8ce87 100644
--- a/lib/tasks/import_reports.rake
+++ b/lib/tasks/import_reports.rake
@@ -15,7 +15,7 @@ namespace :reports do
     pbar = ProgressBar.new("Importing:", reports.size, STDOUT)
     reports.each do |report|
       data = File.read(report)
-      success = data.blank? ? false : Report.create(:report => data).valid?
+      success = Report.create_from_yaml(data) rescue false
       skipped += 1 unless success
       pbar.inc
     end
-- 
1.7.3.1

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to