bugfix
This commit is contained in:
parent
7095d8dca2
commit
168ce230c4
@ -306,12 +306,20 @@ class PricingProgram:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
async def reload_pp_data(ppt):
|
async def reload_pp_data(ppt):
|
||||||
|
env = ServerEnv()
|
||||||
|
ppid = None
|
||||||
|
async with get_sqlor_context(env, 'pricing') as sor:
|
||||||
|
recs = await sor.R('pricing_program', {'id': ppt['id']})
|
||||||
|
if len(recs) == 0:
|
||||||
|
exception(f'{ppt["id"]} not found in pricing_program')
|
||||||
|
return
|
||||||
|
ppid = recs[0].ppid
|
||||||
debug(f'--EventHandle {ppt}')
|
debug(f'--EventHandle {ppt}')
|
||||||
dat = curDateString()
|
dat = curDateString()
|
||||||
k = f'{ppt.ppid}.{dat}'
|
k = f'{ppid}.{dat}'
|
||||||
if PricingProgram.pricing_data.get(k):
|
if PricingProgram.pricing_data.get(k):
|
||||||
del PricingProgram.pricing_data[k]
|
del PricingProgram.pricing_data[k]
|
||||||
await PricingProgram.get_ppid_pricing(ppt.ppid)
|
await PricingProgram.get_ppid_pricing(ppid)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
async def get_ppid_pricing(ppid):
|
async def get_ppid_pricing(ppid):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user