|
@@ -215,12 +215,20 @@ class ReviewViewSet(CustomModelViewSet):
|
|
|
next_time = request.POST.get('next_time')
|
|
|
try:
|
|
|
instance = Review.objects.filter(id=pk).first()
|
|
|
- instance.check_user = request.user
|
|
|
- instance.check_status = check_status
|
|
|
- instance.check_comment = check_comment
|
|
|
- instance.next_time = next_time
|
|
|
- instance.check_time = timezone.now()
|
|
|
- instance.save()
|
|
|
+ if check_status == Review.KEEPUP:
|
|
|
+ instance.check_user = request.user
|
|
|
+ instance.check_status = check_status
|
|
|
+ instance.check_comment = check_comment
|
|
|
+ instance.next_time = next_time
|
|
|
+ instance.check_time = timezone.now()
|
|
|
+ instance.save()
|
|
|
+ if check_status == Review.ABANDON:
|
|
|
+ instance.check_user = request.user
|
|
|
+ instance.check_status = check_status
|
|
|
+ instance.check_comment = check_comment
|
|
|
+ instance.check_time = timezone.now()
|
|
|
+ instance.is_giveup = True
|
|
|
+ instance.save()
|
|
|
except CustomError as e:
|
|
|
return response_error(e.get_error_msg())
|
|
|
except Exception as e:
|