2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 03:26:45 +00:00

Enhance exception management (#8174) (#8175)

(cherry picked from commit 6d0353028fcfe17970772ae888a50c2e3980cd4b)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
github-actions[bot] 2024-09-24 21:52:03 +10:00 committed by GitHub
parent b0353fafbf
commit 178e3313f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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