Commit d955a3a2 by dong

fix20230425

parent f1edd937
......@@ -578,8 +578,8 @@ def industry_policy():
policy_name = req_dict.get("policy_name") # 政策名称
token = request.headers["token"]
user_obj = verify_token(token)
if not user_obj:
return jsonify(code=RET.SESSIONERR, msg='用户未登录。')
# if not user_obj:
# return jsonify(code=RET.SESSIONERR, msg='用户未登录。')
# 校验参数完整性
if not all([page, perpage]):
return jsonify(code=RET.PARAMERR, msg="参数不完整")
......@@ -727,10 +727,12 @@ def industry_policy():
policy_data = []
data = {}
for i in indu_policy:
if i in user_obj.industry_policy:
is_collect = 'True'
else:
is_collect = 'False'
is_collect = ''
if user_obj:
if i in user_obj.industry_policy:
is_collect = 'True'
else:
is_collect = 'False'
policy_data.append({
"id": i.id,
......
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