1.修改了公告附件与制度附件转,json,空数据不转json
This commit is contained in:
@@ -2941,12 +2941,14 @@ class BulletinDetail(APIView):
|
||||
file_list = []
|
||||
# 空列表返回空字符串
|
||||
file_result = file_list if file_list else ""
|
||||
if file_list !="":
|
||||
file_result = json.dumps(file_result)
|
||||
data.append({
|
||||
"id": info.id,
|
||||
"title": info.title,
|
||||
"content": info.content,
|
||||
"times": info.times,
|
||||
"file": json.dumps(file_result),#file_result,
|
||||
"file": file_result,#file_result,
|
||||
"username": info.username,
|
||||
"state": info.state,
|
||||
})
|
||||
@@ -5071,12 +5073,14 @@ class SystemList(APIView):
|
||||
file_list = []
|
||||
# 空列表返回空字符串
|
||||
file_result = file_list if file_list else ""
|
||||
if file_result !="":
|
||||
file_result = json.dumps(file_result)
|
||||
data.append({
|
||||
"id": info.id,
|
||||
"title": info.title,
|
||||
"content": info.content,
|
||||
"times": info.times,
|
||||
"file": json.dumps(file_result), # file 字段解析,
|
||||
"file": file_result, # file 字段解析,
|
||||
"username": info.username,
|
||||
"state": info.state,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user