Disable prefetch on part when saving stock items (#6051)
Contributes to #6013
This commit is contained in:
parent
2dc164634d
commit
3a7b1510b3
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Reference in New Issue