diff --git a/discount/init.py b/discount/init.py index 06d6370..506ecbd 100644 --- a/discount/init.py +++ b/discount/init.py @@ -64,14 +64,17 @@ async def set_promote_discount(request, params_kw): customerid, biz_date, recs[0].discount) if not need_new_discount: return - await sor.C('discount', { - 'id': getID(), - 'resellerid': recs[0].resellerid, - 'customerid': customerid, - 'discount': recs[0].discount, - 'enabled_date': enabled_date, - 'expired_date': expired_date - } + ret = { + 'id': getID(), + 'resellerid': recs[0].resellerid, + 'customerid': customerid, + 'discount': recs[0].discount, + 'enabled_date': enabled_date, + 'expired_date': expired_date + } + await sor.C('discount', ret.copy()) + return ret + return None async def disable_old_discount(sor, resellerid, customerid, biz_date, new_discount): sql = """select * from discount