mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +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.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
|
||||
|
Reference in New Issue
Block a user