我的mongo引擎模型如下所示
class Device(BaseDocument):
name = StringField(),
ipmsType = StringField(),
我想像这样将表单请求主体转换为要保存在mongodb中的模型对象
device_form = request.get_json()
print("here is what i am getting", device_form)
current_app.logger.info("Inside device route")
device_model = Device(**device_form)
device_model.save()
但是我收到此错误
The fields "{'name', 'ipmsType'}" do not exist on the document "Device"