mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
Prevent invalid invoice logo from crashing the InvoiceWorker
This commit is contained in:
parent
ca61e4e08e
commit
1253af5377
@ -3,6 +3,7 @@
|
||||
- Fix a bug: projects RSS feed fails to render
|
||||
- Fix a bug: abuses reports are not notified to admins
|
||||
- Fix a bug: SubscriptionExpireWorker cannot run due to wrong expiration column in SQL query
|
||||
- Prevent invalid invoice logo from crashing the InvoiceWorker
|
||||
- Updated user's manual for v4 (fr)
|
||||
- Optimized Dockerfile to speed up build time
|
||||
|
||||
|
@ -26,7 +26,11 @@ class PDF::Invoice < Prawn::Document
|
||||
|
||||
# logo
|
||||
img_b64 = Setting.find_by(name: 'invoice_logo')
|
||||
image StringIO.new(Base64.decode64(img_b64.value)), fit: [415, 40]
|
||||
begin
|
||||
image StringIO.new(Base64.decode64(img_b64.value)), fit: [415, 40]
|
||||
rescue StandardError => e
|
||||
puts "Unable to decode invoice logo from base64: #{e}"
|
||||
end
|
||||
move_down 20
|
||||
font('Open-Sans', size: 10) do
|
||||
# general information
|
||||
|
Loading…
x
Reference in New Issue
Block a user