...
|
...
|
@@ -59,17 +59,12 @@ class ProjectDetail(RetrieveAPIView): |
|
|
auditors = Auditor.objects.all()
|
|
|
# result = Result.objects.filter(project=obj)
|
|
|
for i in auditors:
|
|
|
res = i.result_auditor.filter(project=obj).values('is_accept', 'memo').first()
|
|
|
obj.result.append({
|
|
|
"auditor": i.user.username,
|
|
|
"is_accept": i.result_auditor.filter(project=obj).values_list('is_accept', flat=True).first()
|
|
|
"is_accept": res['is_accept'],
|
|
|
"memo": res['memo'],
|
|
|
})
|
|
|
# auditor_len = Result.objects.filter(project=obj).count()
|
|
|
# if auditor_len == 2:
|
|
|
# obj.cur_auditor = "已完结"
|
|
|
# elif auditor_len == 1:
|
|
|
# obj.cur_auditor = AUDITORS[1][1]
|
|
|
# else:
|
|
|
# obj.cur_auditor = AUDITORS[0][1]
|
|
|
return response(ProjectSerializer(obj).data)
|
|
|
|
|
|
|
...
|
...
|
|