Fix error while generating pdf when venue is nil

Error in generating pdf for ticket when venue is not set is fixed.Showing venue in pdf only if venue exist.
Closes https://github.com/opensuse/osem/issues/1683
This commit is contained in:
rahul 2017-09-11 23:01:28 +05:30 committed by Stella Rouzi
parent be6bfb6aad
commit ec91db86f9

View file

@ -51,7 +51,9 @@ class TicketPdf < Prawn::Document
move_down 70
draw_text @conference.title.to_s, at: [@mid_horizontal + 30, cursor - 30], size: 12
draw_text @conference.organization.name.to_s, at: [@mid_horizontal + 30, cursor - 50], size: 12
draw_text @conference.venue.name.to_s, at: [@mid_horizontal + 30, cursor - 70]
if @conference.venue
draw_text @conference.venue.name.to_s, at: [@mid_horizontal + 30, cursor - 70]
end
move_up 130
move_down @mid_vertical
end