示例#1
0
def join_traces(request):
    if request.method == 'POST':
        json_data = simplejson.loads(request.raw_post_data)
        fault_section = models.FaultSection.objects.create(fault_section_name=json_data['section_name'])

        traces = [models.Trace.objects.get(pk=trace_fid.split('.')[1])
                  for trace_fid in json_data['trace_ids']]
        utils.join_traces(traces, fault_section)

    return OK_RESPONSE
示例#2
0
 def _join_traces(self):
     utils.join_traces([self.trace], self.fault_section)
     self.fault_section = models.FaultSection.objects.get(
         pk=self.fault_section.pk)
示例#3
0
文件: tests.py 项目: gem/oq-platform
 def _join_traces(self):
     utils.join_traces([self.trace], self.fault_section)
     self.fault_section = models.FaultSection.objects.get(pk=self.fault_section.pk)