def api_gen_laudo(): logger.debug(f"Generate laudo: {request.form}") try: fpath = laudomaker.make_laudos( Registro.get_ids([request.form.get("reg_id")]))[0] except Exception as e: logger.exception(e) return "" else: return url_for("api_get_laudo", fname=os.path.split(fpath)[1])
def api_gen_relatorio(): logger.debug(f"Generate report: {request.form}") try: fpath = utils.zip_files(sheetmaker.make_sheet( regs=Registro.get_ids(request.form.getlist("reg_ids"))), remove_dirs=True) except Exception as e: logger.exception(e) return "" else: return url_for("api_get_relatorio", fname=os.path.split(fpath)[1])