Ejemplo n.º 1
0
def copy(request):
    '''save parameter value for exiting parameter group'''
    result = True
    try:
        CITaskParameterService.copy_task_parameter(request)
    except Exception as ex:
        result = str(ex)
        SimpleLogger.exception(ex)
    return HttpResponse(result)
 def post(self, request, *args, **kwargs):
     group_id = self.kwargs['id']
     parameter_group = CITaskParameterService.copy_task_parameter(group_id)
     group_serializer = ci_serializer.TaskParameterGroupSerializer(
         instance=parameter_group)
     return Response(group_serializer.data)