lib/daengine/taxonomy_parser.rb in daengine-0.3.8.2 vs lib/daengine/taxonomy_parser.rb in daengine-0.3.8.3
- old
+ new
@@ -43,17 +43,18 @@
end
my_terms = entity.xpath('term').map
unless my_terms.nil?
entity.xpath('term').map do |j|
a_term = parse_taxonomy_term(j)
+ a_term.parent_term = category
category.child_terms << a_term
end
end
begin
category.save!
rescue Exception => e
#puts "--**Exception**-- #{e}"
- @error_msg << "Failed to add record #{category.try(:label)}, #{category.try(:errors).try(:full_messages)}"
+ p "Failed to add record #{category.try(:label)}, #{category.try(:errors).try(:full_messages)}"
end
category
end
def self.time