Skip to content
Snippets Groups Projects

Bug/kit request mail crash

Merged Carlos Vega requested to merge bug/kit_request_mail_crash into master
1 unresolved thread
1 file
+ 5
2
Compare changes
  • Side-by-side
  • Inline
  • 286d0f70
    Issue #259 check if the appointment has visit or subject · 286d0f70
    Carlos Vega authored
+ 5
2
@@ -110,8 +110,11 @@ def send_mail(data):
email_body += "<tr style='" + row_style + "'>"
email_body += "<td style='" + cell_style + "'>" + \
appointment.datetime_when.strftime('%Y-%m-%d %H:%M') + "</td>"
email_body += "<td style='" + cell_style + "'>" + \
appointment.visit.subject.nd_number + "</td>"
if appointment.visit is not None and appointment.visit.subject is not None:
email_body += "<td style='" + cell_style + "'>" + \
appointment.visit.subject.nd_number + "</td>"
else:
email_body += "<td style='" + cell_style + "'>" + '-' + "</td>"
email_body += "<td style='" + cell_style + "'>"
for type in appointment.appointment_types.all():
for item in type.required_equipment.all():
Loading