handle missing printer in label profile templates
This commit is contained in:
parent
b1faddd33e
commit
95096e0872
|
@ -16,7 +16,7 @@
|
|||
% if form.updating:
|
||||
<% profile = form.fieldset.model %>
|
||||
<% printer = profile.get_printer() %>
|
||||
% if printer.required_settings:
|
||||
% if printer and printer.required_settings:
|
||||
<li>${h.link_to("Edit Printer Settings", url('label_profile.printer_settings', uuid=profile.uuid))}</li>
|
||||
% endif
|
||||
<li>${h.link_to("View this Label Profile", url('label_profile.read', uuid=profile.uuid))}</li>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<% profile = form.fieldset.model %>
|
||||
<% printer = profile.get_printer() %>
|
||||
<li>${h.link_to("Edit this Label Profile", url('label_profile.update', uuid=form.fieldset.model.uuid))}</li>
|
||||
% if printer.required_settings:
|
||||
% if printer and printer.required_settings:
|
||||
<li>${h.link_to("Edit Printer Settings", url('label_profile.printer_settings', uuid=profile.uuid))}</li>
|
||||
% endif
|
||||
% endif
|
||||
|
@ -17,7 +17,7 @@ ${parent.body()}
|
|||
<% profile = form.fieldset.model %>
|
||||
<% printer = profile.get_printer() %>
|
||||
|
||||
% if printer.required_settings:
|
||||
% if printer and printer.required_settings:
|
||||
<h2>Printer Settings</h2>
|
||||
|
||||
<div class="form">
|
||||
|
|
Loading…
Reference in a new issue