Skip to content

Commit

Permalink
remove try code from label view
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Sep 8, 2024
1 parent ee1cd85 commit 7d862bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion auctions/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ def test_small_labels(self):
assert "attachment; filename=" in response.headers["Content-Disposition"]

def test_thermal_labels(self):
"""Test hat a regular user can print their own labels."""
"""Test that a regular user can print their own labels."""
user_label_prefs, created = UserLabelPrefs.objects.get_or_create(user=self.user)
user_label_prefs.preset = "thermal_sm"
user_label_prefs.save()
Expand Down
16 changes: 8 additions & 8 deletions auctions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4508,15 +4508,15 @@ def get(self, request, *args, **kwargs):
if request.user.is_superuser:
return self.create_labels(request, *args, **kwargs)
else:
try:
return self.create_labels(request, *args, **kwargs)
# 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"))
# 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):
Expand Down

0 comments on commit 7d862bd

Please sign in to comment.