mirror of
https://github.com/discourse/discourse.git
synced 2025-06-11 05:53:49 +08:00
FIX: rescue error when importing category structure
This commit is contained in:
@ -76,6 +76,7 @@ module ImportExport
|
|||||||
@categories.sort_by! { |c| c[:parent_category_id].presence || 0 }
|
@categories.sort_by! { |c| c[:parent_category_id].presence || 0 }
|
||||||
|
|
||||||
@categories.each do |cat_attrs|
|
@categories.each do |cat_attrs|
|
||||||
|
begin
|
||||||
id = cat_attrs.delete(:id)
|
id = cat_attrs.delete(:id)
|
||||||
permissions = cat_attrs.delete(:permissions_params)
|
permissions = cat_attrs.delete(:permissions_params)
|
||||||
|
|
||||||
@ -94,6 +95,9 @@ module ImportExport
|
|||||||
post.save!
|
post.save!
|
||||||
post.rebake!
|
post.rebake!
|
||||||
end
|
end
|
||||||
|
rescue
|
||||||
|
next
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self
|
self
|
||||||
|
Reference in New Issue
Block a user