2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-01 04:56:45 +00:00

Cast barcode scan IDs to list (#8701)

- Fixes issues with limitations on old MySQL server
This commit is contained in:
Oliver 2024-12-18 16:51:32 +11:00 committed by GitHub
parent 1910612725
commit 4569fd273d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -92,7 +92,7 @@ class BarcodeView(CreateAPIView):
if num_scans > max_scans: if num_scans > max_scans:
n = num_scans - max_scans n = num_scans - max_scans
old_scan_ids = ( old_scan_ids = list(
BarcodeScanResult.objects.all() BarcodeScanResult.objects.all()
.order_by('timestamp') .order_by('timestamp')
.values_list('pk', flat=True)[:n] .values_list('pk', flat=True)[:n]