diff --git a/pricing/pricing.py b/pricing/pricing.py index 572679a..fdf68d0 100644 --- a/pricing/pricing.py +++ b/pricing/pricing.py @@ -274,6 +274,14 @@ class PricingProgram: raise Exception(e) async def charging(sor, ppid, data): + if ppid is None: + e = Exception(f'ppid is None, {data=}') + exception(f'{e}') + raise e + if data is None: + e = Exception(f'{ppid=} data is None') + exception(f'{e}') + raise e env = ServerEnv() biz_date = await env.get_business_date(sor) sql = """select a.name, a.ownerid, a.providerid, @@ -303,6 +311,10 @@ order by b.enabled_date desc""" """ yamlstr是从 """ + if config_data is None: + e = Exception(f'config_data is None, {yamlstr=}') + exception(f'{e=}') + raise e d = None try: d = yaml.safe_load(yamlstr)