FIX: rescue error when importing category structure
This commit is contained in:
parent
f57d3c2315
commit
5849bae9df
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue