设置Gmail发送邮件测试失败
coffeehb opened this issue · 1 comments
coffeehb commented
报错信息如下:
[30/Aug/2022 06:18:20] "GET /api/v1/configs/manage/?page_size=20 HTTP/1.1" 200 390
Internal Server Error: /api/v1/auth/sendmail/test/
Traceback (most recent call last):
File "/home/antenna/.local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/antenna/.local/lib/python3.10/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.10/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/home/antenna/.local/lib/python3.10/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/home/antenna/.local/lib/python3.10/site-packages/rest_framework/viewsets.py", line 125, in view
return self.dispatch(request, *args, **kwargs)
File "/home/antenna/.local/lib/python3.10/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/home/antenna/.local/lib/python3.10/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/home/antenna/.local/lib/python3.10/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/home/antenna/.local/lib/python3.10/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/antenna/modules/account/views.py", line 57, in test
serializer.is_valid(raise_exception=True)
File "/home/antenna/.local/lib/python3.10/site-packages/rest_framework/serializers.py", line 220, in is_valid
self._validated_data = self.run_validation(self.initial_data)
File "/home/antenna/.local/lib/python3.10/site-packages/rest_framework/serializers.py", line 422, in run_validation
value = self.validate(value)
File "/antenna/modules/account/serializers.py", line 50, in validate
del attrs['verify_code']
KeyError: 'verify_code'