scan-data-labels: Don't return records with empty label
This commit is contained in:
parent
f6fa95e414
commit
73bf4bd58a
@ -1928,7 +1928,9 @@ class ScanDataLabelsView(BaseView):
|
||||
|
||||
def get(self, request):
|
||||
ret = []
|
||||
for x in ScanData.objects.all().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'):
|
||||
if not x.get('labels'):
|
||||
continue
|
||||
ret.append({
|
||||
'id': x['id'],
|
||||
'labels': x.get('labels'),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user