Esempio n. 1
0
 def after_update(self, request, serializer):
     # 富文本内容
     content = request.data.get('content', None)
     # 文件
     files = request.data.get('files', None)
     # 新增任务上传文件日志
     BusinessPublic.create_task_file_texts(serializer.data['id'], files,
                                           content)
Esempio n. 2
0
    def after_create(self, request, serializer):
        project_id = request.data.get('project', None)
        project = Project.objects.get(id=project_id)

        # 富文本内容
        content = request.data.get('content', None)
        # 文件
        files = request.data.get('files', None)

        # - 更新相关项目信息
        self.update_project(project)

        # - 新增任务上传文件日志
        BusinessPublic.create_task_file_texts(serializer.data['id'], files,
                                              content)