mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-03 17:05:18 +00:00
Enhance exception management (#8174)
This commit is contained in:
1 parent
0f2cfdcfd4
commit
6d0353028f
1 file changed
+2
-1
@@ -353,7 +353,8 @@ class LineItemPricing(PartPricing):
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user