2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00

Cast barcode scan IDs to list (#8701) (#8702)

- Fixes issues with limitations on old MySQL server

(cherry picked from commit 4569fd273dbbb28b2e173374e7530b247ab9cf5b)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
github-actions[bot] 2024-12-18 17:04:18 +11:00 committed by GitHub
parent b57d035f7f
commit 04aec83e95
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:
n = num_scans - max_scans
old_scan_ids = (
old_scan_ids = list(
BarcodeScanResult.objects.all()
.order_by('timestamp')
.values_list('pk', flat=True)[:n]