Commit aec106df authored by Wallen姚文辉's avatar Wallen姚文辉

修复bug

parent 93e25cc0
......@@ -92,7 +92,7 @@ def adduser():
return jsonify({"code": 401, "message": "用户名重复,请重试"}),401
create_time=time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))
db.session.add(User(name=data.get("name"),password=generate_password_hash(data.get("password")),role_id=int(data.get("role_id")),organization_id=(int(data.get("organization_id")) or None),create_date=create_time,create_user=(session.get("id") or 0),
disable=(data.get("disable") or 0),jira_account=data.get("jira_account"),jira_password=data.get("jira_password"),email_adress=(data.get("email_adress") or None)))
disable=(data.get("disable") or 0),jira_account=data.get("jira_account"),jira_password=data.get("jira_password"),email_address=(data.get("email_address") or None)))
db.session.commit()
db.session.close()
return jsonify({"code": 200, "message": "添加成功"}),200
......
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