aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/mail_handler/mail_handler.rb2
-rw-r--r--lib/tasks/import.rake12
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/mail_handler/mail_handler.rb b/lib/mail_handler/mail_handler.rb
index 918f91180..53033d440 100644
--- a/lib/mail_handler/mail_handler.rb
+++ b/lib/mail_handler/mail_handler.rb
@@ -59,7 +59,7 @@ module MailHandler
end
# e.g. http://www.whatdotheyknow.com/request/copy_of_current_swessex_scr_opt#incoming-9928
- if content_type == 'application/acrobat'
+ if content_type == 'application/acrobat' or content_type == 'document/pdf'
content_type = 'application/pdf'
end
diff --git a/lib/tasks/import.rake b/lib/tasks/import.rake
index 0e8397fde..c8183c745 100644
--- a/lib/tasks/import.rake
+++ b/lib/tasks/import.rake
@@ -54,12 +54,12 @@ namespace :import do
STDERR.puts "Now importing the public bodies..."
# Now it's (probably) safe to try to import:
- errors, notes = PublicBody.import_csv(tmp_csv.path,
- tag='',
- tag_behaviour='replace',
- dryrun,
- editor="#{ENV['USER']} (Unix user)",
- I18n.available_locales) do |row_number, fields|
+ errors, notes = PublicBody.import_csv_from_file(tmp_csv.path,
+ tag='',
+ tag_behaviour='replace',
+ dryrun,
+ editor="#{ENV['USER']} (Unix user)",
+ I18n.available_locales) do |row_number, fields|
percent_complete = (100 * row_number.to_f / number_of_rows).to_i
STDERR.print "#{row_number} out of #{number_of_rows} "
STDERR.puts "(#{percent_complete}% complete)"