annotation_dashboard/commit

ADDED: target_has_image/1

authorJacco van Ossenbruggen
Sun Sep 21 17:38:20 2014 +0200
committerJacco van Ossenbruggen
Sun Sep 21 17:38:20 2014 +0200
commit7f5d947c61eaf2544181dae4de7943d50a2e510f
tree07e0a41b72130bae08272a1f6ed2e025375cc3b7
parent14fc5a9993bf1dca51175fa901d827b99956583b
Diff style: patch stat
diff --git a/lib/dashboard_util.pl b/lib/dashboard_util.pl
index 0401519..ac517e0 100644
--- a/lib/dashboard_util.pl
+++ b/lib/dashboard_util.pl
@@ -3,6 +3,7 @@
 	    guess_task/2,
 	    count_annotations/2,
 	    blacklisted_annotation/1,
+	    target_has_image/1,
 	    find_annotations_by_user/2,
 	    find_annotations_by_task/2,
 	    find_annotations_without_task/1,
@@ -156,10 +157,12 @@ representative(Candidates, Representative) :-
 representative(_, no_representative_found).
 
 find_first_with_image([H|_], H) :-
-	\+ no_object_image(H), !.
+	target_has_image(H),!.
 find_first_with_image([_|T], First) :-
 	find_first_with_image(T, First).
 
+target_has_image(T) :-
+	\+ no_object_image(T), !.
 
 property_key_label(500, targets_untouched, 'works without tags').
 property_key_label(200, targets_total,     'works targeted').