api: add succeeded to scan data labels
This commit is contained in:
parent
85bda4052f
commit
a7c16716f7
@ -1890,7 +1890,7 @@ class ScanDataLabelsView(BaseView):
|
||||
|
||||
def get(self, request):
|
||||
ret = []
|
||||
for x in ScanData.objects.all().filter(labels__isnull=False).order_by('pk').values('id', 'labels', 'image', 'code'):
|
||||
for x in ScanData.objects.all().filter(labels__isnull=False).order_by('pk').values('id', 'labels', 'image', 'code', 'succeeded'):
|
||||
if not x.get('labels'):
|
||||
continue
|
||||
ret.append({
|
||||
@ -1898,6 +1898,7 @@ class ScanDataLabelsView(BaseView):
|
||||
'labels': x.get('labels'),
|
||||
'code': x.get('code'),
|
||||
'image': x.get('image'),
|
||||
'succeeded': x.get('succeeded'),
|
||||
})
|
||||
return JsonResponse({
|
||||
'items': ret,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user