diff --git a/app/controllers/admin/import_controller.rb b/app/controllers/admin/import_controller.rb index 6027b46..7180442 100644 --- a/app/controllers/admin/import_controller.rb +++ b/app/controllers/admin/import_controller.rb @@ -85,6 +85,8 @@ class Admin::ImportController < OrbitAdminController if archive_file.nil? archive_file = ArchiveFile.new archive_file.rss2_sn = file['Sn'] + else + archive_file.archive_file_multiples.destroy_all end archive_file.title_translations = file['title'] @@ -122,6 +124,9 @@ class Admin::ImportController < OrbitAdminController if bulletin.nil? bulletin = Bulletin.new bulletin.rss2_sn = news['Sn'] + else + bulletin.bulletin_links.destroy_all + bulletin.bulletin_files.destroy_all end bulletin.update_user = current_user bulletin.title_translations = news['Title'] diff --git a/app/views/admin/import/index.html.erb b/app/views/admin/import/index.html.erb index f75c837..312e380 100644 --- a/app/views/admin/import/index.html.erb +++ b/app/views/admin/import/index.html.erb @@ -148,7 +148,7 @@ @@ -175,7 +175,7 @@