Ejemplo n.º 1
0
def get_attachments_by_problem_report_id(pr_id):
    dao        = AttachmentDAO( Config.database['schema'] )
    attachment = dao.get_all_by_problem_report_id(pr_id)

    return { "attachments": convert_obj_list_to_dict_list(attachment) }, 200
Ejemplo n.º 2
0
def get_attachment_by_id(row_id):
    dao        = AttachmentDAO( Config.database['schema'] )
    attachment = dao.get(row_id)

    return { "attachments": attachment.as_dict() }, 200
Ejemplo n.º 3
0
def get_attachments(count, start):
    dao         = AttachmentDAO( Config.database['schema'] )
    attachments = dao.get_all(count, start)
    
    return { "attachments": convert_obj_list_to_dict_list(attachments) }, 200