tkp.db.quality – Routines handling the ‘rejectreason’ table.

check image quality

tkp.db.quality.isrejected(imageid, session)[source]

Find out if an image is rejected or not :param imageid: The image ID :param session: Database session. :type session: sqlalchemy.orm.session.Session

Returns:
Empty if not rejected, a list of strings formatted as
’{description}: {comment}’ if rejected.
Return type:list
tkp.db.quality.reject(imageid, reason, comment, session)[source]

Add a reject reason to the db for a given image.

Parameters:
tkp.db.quality.sync_rejectreasons(session)[source]

Check if rejectreasons are in sync. If not, insert as needed and commit.

Parameters:session (sqlalchemy.orm.session.Session) – Database session.
tkp.db.quality.unreject(imageid, session)[source]

Remove any rejections of a given imageid

Parameters: