api: Fix 'code' in scan-data-labels

This commit is contained in:
Fam Zheng 2025-05-06 07:33:47 +01:00
parent 62cf8259c1
commit f6fa95e414

View File

@ -1928,7 +1928,7 @@ class ScanDataLabelsView(BaseView):
def get(self, request):
ret = []
for x in ScanData.objects.all().order_by('pk').values('id', 'labels', 'image'):
for x in ScanData.objects.all().order_by('pk').values('id', 'labels', 'image', 'code'):
ret.append({
'id': x['id'],
'labels': x.get('labels'),