Skip to content

Commit

Permalink
fix print error catching
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Aug 2, 2024
1 parent e4aff72 commit eefdefe
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions auctions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3691,13 +3691,15 @@ def create_labels(self, request, *args, **kwargs):
return response

def get(self, request, *args, **kwargs):
#try:
if True:
if request.user.is_superuser:
return self.create_labels(request, *args, **kwargs)
#except LayoutError: # some day I will track down all the possible error types and add them here
#except:
# messages.error(request, "Unable to print labels, this is likely caused by an invalid custom setting here")
# return redirect(reverse('printing'))
else:
try:
return self.create_labels(request, *args, **kwargs)
#except LayoutError: # some day I will track down all the possible error types and add them here
except:
messages.error(request, "Unable to print labels, this is likely caused by an invalid custom setting here")
return redirect(reverse('printing'))

class UnprintedLotLabelsView(LotLabelView):
"""Print lot labels, but only ones that haven't already been printed"""
Expand Down

0 comments on commit eefdefe

Please sign in to comment.