FIX: rescue error when importing category structure

This commit is contained in:
Arpit Jalan 2017-11-01 22:19:13 +05:30
parent f57d3c2315
commit 5849bae9df
1 changed files with 19 additions and 15 deletions

View File

@ -76,6 +76,7 @@ module ImportExport
@categories.sort_by! { |c| c[:parent_category_id].presence || 0 }
@categories.each do |cat_attrs|
begin
id = cat_attrs.delete(:id)
permissions = cat_attrs.delete(:permissions_params)
@ -94,6 +95,9 @@ module ImportExport
post.save!
post.rebake!
end
rescue
next
end
end
self