Skip to content

Commit

Permalink
shots in the dark
Browse files Browse the repository at this point in the history
  • Loading branch information
pkarman committed May 14, 2020
1 parent 2623387 commit 47d2089
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/services/pdf_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def self.write(filename, contents, pdf_attributes)

# pdftk will crash on corrupt PDFs with the "Error: Unable to find file";
# if this happens, write the file without attributes
unless stderr.empty?
unless stderr.blank?
# contents might come back as nil
Rails.logger.warn("cannot write pdf of size #{contents.try(:size).to_i} via #{command}: #{stderr}")
File.open(filename, "wb") do |f|
Expand Down
2 changes: 1 addition & 1 deletion app/services/zipfile_creator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ZipfileCreator

def process
records = manifest.records
return if records.empty?
return if records.blank?

t = Tempfile.new
write_to_tempfile(t, records)
Expand Down

0 comments on commit 47d2089

Please sign in to comment.