Skip to content

Commit

Permalink
Enhance exception management (#8174)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6d03530)
  • Loading branch information
SchrodingersGat committed Sep 24, 2024
1 parent b0353fa commit c905dad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backend/InvenTree/order/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ def get_part(self, id=False):
try:
part_id = self.request.POST.get('pk')
part = Part.objects.get(id=part_id)
except Part.DoesNotExist:
except Exception:
# Part not found, or invalid ID
return None
else:
return None
Expand Down

0 comments on commit c905dad

Please sign in to comment.