2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-07 07:48:50 +00:00

Disable prefetch on part when saving stock items ()

Contributes to 
This commit is contained in:
Miklós Márton 2023-12-07 21:19:48 +01:00 committed by GitHub
parent 2dc164634d
commit 3a7b1510b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -779,6 +779,7 @@ class StockList(APIDownloadMixin, ListCreateDestroyAPIView):
})
try:
Part.objects.prefetch_related(None)
part = Part.objects.get(pk=data.get('part', None))
except (ValueError, Part.DoesNotExist):
raise ValidationError({