Skip to content
Commits on Source (1)
  • Marco De Donno's avatar
    Check if there is an annotation of a particular target · 42423c76
    Marco De Donno authored
    This will ensure that the target finger has at least one annotation
    image. If the target has been edited and the image removed (for any
    reason), the check was telling that the target was active, even if there
    is no more an illustration.
    
    This commit ensure that all target have at least one annotation image.
    42423c76
...@@ -713,7 +713,8 @@ def admin_show_target_list( uuid ): ...@@ -713,7 +713,8 @@ def admin_show_target_list( uuid ):
LEFT JOIN cnm_folder ON submissions.donor_id = cnm_folder.donor_id LEFT JOIN cnm_folder ON submissions.donor_id = cnm_folder.donor_id
LEFT JOIN cnm_annotation ON cnm_folder.uuid = cnm_annotation.folder_uuid LEFT JOIN cnm_annotation ON cnm_folder.uuid = cnm_annotation.folder_uuid
WHERE WHERE
submissions.uuid = %s submissions.uuid = %s AND
cnm_annotation.data IS NOT NULL
GROUP BY pc GROUP BY pc
""" """
annotations = config.db.query_fetchall( sql, ( uuid, ) ) annotations = config.db.query_fetchall( sql, ( uuid, ) )
......