This commit is contained in:
yumoqing 2026-03-24 14:19:14 +08:00
parent d991851d1c
commit 663a64375a
3 changed files with 4 additions and 5 deletions

View File

@ -197,8 +197,8 @@ class PricingProgram:
debug(f'id={ppid} pricing_program not found') debug(f'id={ppid} pricing_program not found')
r = recs[0] r = recs[0]
x = DictObject(** yaml.safe_load(r.pricing_spec)) x = DictObject(** yaml.safe_load(r.pricing_spec))
webpath = env.quote(write_pattern_xlsx(x)) fpath = write_pattern_xlsx(x)
return env.entire_url(f'/idfile?path={webpath}') return fpath
@staticmethod @staticmethod
def pp_db2app(pp): def pp_db2app(pp):

View File

@ -37,8 +37,7 @@ def write_pattern_xlsx(fields: dict) -> str:
fs = FileStorage() fs = FileStorage()
fp = fs._name2path(f'pricing_{getID}.xlsx') fp = fs._name2path(f'pricing_{getID}.xlsx')
wb.save(fp) wb.save(fp)
webpath = fs.webpath(fp) return fp
return webpath
def create_options(ws, dcol, sheet, opt_id, options): def create_options(ws, dcol, sheet, opt_id, options):
r = 2 r = 2

View File

@ -1,3 +1,3 @@
debug(f'download_pricing_pattern.dspy{params_kw=}') debug(f'download_pricing_pattern.dspy{params_kw=}')
url = await write_pricing_patten(request, params_kw.ppid) url = await write_pricing_patten(request, params_kw.ppid)
await redirect(url) return await file_response(request, fp)