diff --git a/xls2ddl/tmpls.py b/xls2ddl/tmpls.py index 2f51ef1..a6fdd20 100644 --- a/xls2ddl/tmpls.py +++ b/xls2ddl/tmpls.py @@ -305,6 +305,8 @@ db = DBPools() dbname = get_module_dbname('{{modulename}}') async with db.sqlorContext(dbname) as sor: r = await sor.C('{{summary[0].name}}', ns.copy()) + _new_rows = await sor.sqlExe("SELECT * FROM {{summary[0].name}} WHERE {{summary[0].pkey}} = ${id}$", {'id': id}) + _user_data = _new_rows[0] if _new_rows else ns return { "widgettype":"Message", "options":{ @@ -312,7 +314,8 @@ async with db.sqlorContext(dbname) as sor: "cheight":9, "title":"Add Success", "timeout":3, - "message":"ok" + "message":"ok", + "user_data": _user_data } }