Skip to content

Commit

Permalink
Merge pull request #128 from wuba/feature/version
Browse files Browse the repository at this point in the history
修改新增和修改逻辑
  • Loading branch information
bios000 authored Jun 6, 2023
2 parents b74781b + 6baaf99 commit cdb8e11
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions modules/task/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def get_result_data(data):
"template_choice_type": template.choice_type,
"task_config_id": item["task_config"],
"url_template": task_configs[item["task_config"]].url_template_id if task_configs[
item["task_config"]].url_template_id else item["template"],
item["task_config"]].url_template_id else UrlTemplate.objects.filter(template_id=item["template"]).first().id,
"key": url,
"task_config_item_list": [task_config_item_list]
})
Expand Down Expand Up @@ -275,15 +275,13 @@ def update_config(self, request, *args, **kwargs):
}]
}
"""
print(request.data)
serializer = self.get_serializer(data=request.data)
serializer.is_valid(raise_exception=True)
task_id = serializer.data["task"]
template_id = serializer.data["template"]
task_config_id = serializer.data["task_config"]
template_config_item_list = request.data["template_config_item_list"]
url_template_id = request.data["url_template"]
print(2)
with transaction.atomic():
task_config = TaskConfig.objects.filter(id=task_config_id, task__user_id=self.request.user.id).first()
if not task_config:
Expand Down

0 comments on commit cdb8e11

Please sign in to comment.