self.current_user写不入数据库
来源:11-5 通过aiofiles保存图片文件-2

repiak
2020-02-01
try:
group = await self.application.objects.create(CommunityGroup,
add_user=self.current_user, name=group_form.name.data,
category=group_form.category.data,
desc=group_form.desc.data,
notice=group_form.notice.data,
from_image=new_filename)
re_data["id"] = group.id
except Exception as e:
self.set_status(400)
re_data["msg"] = "数据库写入异常"
直接到except里了
写回答
2回答
-
兰小宇
2020-03-02
报错是什么呢?
022020-03-03 -
bobby
2020-02-02
你打印看看 e的内容是什么
00
相似问题