diff --git a/ad_tasks.py b/ad_tasks.py index 998ce78..3fd4f36 100644 --- a/ad_tasks.py +++ b/ad_tasks.py @@ -99,13 +99,14 @@ def send_cache_data(): print(f"0={item}") temp = {} temp['jump_param'] = item['jump_param'] - pdb.set_trace() if not isinstance(item.get('ad_property', {}), dict): - item['ad_property'] = json.loads(item.get('ad_property', {})) - item['ad_property'].update(temp) + if not item.get('ad_property', {}): + item['ad_property']={}.update(temp) + else: + item['ad_property'] = json.loads(item.get('ad_property', {})).update(temp) item['ad_property']=json.dumps(item['ad_property']) print(f"1={item}") - except Except: + except Exception: log.error(f"write {item}",exc_info=True) all.append(item)