Commit afe09e23 authored by ZZH's avatar ZZH

fix revise news 2024-03-11

parent d1986959
......@@ -35,7 +35,8 @@ async def upload_news_qs(request):
"""附件上传"""
url_article, url_cover = "", ""
news_file = request.files.getlist("file1")[0]
cover_file = request.files.getlist("file2")[0]
file2_lst = request.files.getlist("file2")
cover_file = file2_lst[0] if file2_lst else None
if not news_file:
return False, url_article, url_cover
......
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