Commit 39dfe2cd authored by pengxiong's avatar pengxiong

设置默认模版修复

parent 08710f04
......@@ -97,6 +97,10 @@ class FundReportManange(Base, BaseModel):
sql = "select ui_username_mp from user_info where id = '{}'".format(self.ifa_id)
res = tamp_user_session.execute(sql)
data['author_name'] = res.fetchone()[0]
if self.default_template:
data['sys_default'] = 1
else:
data['sys_default'] = 0
return data
......
......@@ -212,7 +212,8 @@ def set_default_template(args):
))
if not res:
return False
tamp_diagnose_session.query(FundReportManange).update({
type = res.type
tamp_diagnose_session.query(FundReportManange).filter(FundReportManange.type==type).update({
'default': 0
})
r = res.update({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment