haha
This commit is contained in:
@@ -62,7 +62,10 @@ def task_list(request):
|
||||
data["params"] = {}
|
||||
|
||||
ser = TaskCreateSerializer(data=data)
|
||||
ser.is_valid(raise_exception=True)
|
||||
if not ser.is_valid():
|
||||
logger.warning("任务提交参数校验失败: data=%s, errors=%s", data, ser.errors)
|
||||
from rest_framework.exceptions import ValidationError
|
||||
raise ValidationError(ser.errors)
|
||||
|
||||
validated = ser.validated_data.copy()
|
||||
account_id = validated.pop("id", None) or validated.pop("account_id", None)
|
||||
|
||||
Reference in New Issue
Block a user