Skip to content

Commit cb318d4

Browse files
committed
fix order of annotations in verification view
1 parent 2a7b2e3 commit cb318d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

imagetagger/imagetagger/annotations/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ def load_filtered_set_annotations(request) -> Response:
729729

730730
images = Image.objects.filter(image_set=imageset)
731731
annotations = Annotation.objects.filter(image__in=images,
732-
annotation_type__active=True).order_by('image_id').select_related()
732+
annotation_type__active=True).order_by('image__name', 'id').select_related()
733733
if annotation_type_id > -1:
734734
annotations = annotations.filter(annotation_type__id=annotation_type_id)
735735
if verified:

imagetagger/imagetagger/images/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def view_imageset(request, image_set_id):
415415
all_annotation_types = AnnotationType.objects.filter(active=True)
416416
annotations = Annotation.objects.filter(
417417
image__in=images,
418-
annotation_type__active=True).order_by("id")
418+
annotation_type__active=True).order_by('image__name', 'id')
419419
annotation_types = AnnotationType.objects.filter(annotation__image__image_set=imageset, active=True).distinct()\
420420
.annotate(count=Count('annotation'),
421421
in_image_count=Count('annotation', filter=Q(annotation__vector__isnull=False)),

0 commit comments

Comments
 (0)