Merge pull request 'update' (#107) from shaxob into main
Some checks failed
Deploy to Production / build-and-deploy (push) Failing after 3m43s
Some checks failed
Deploy to Production / build-and-deploy (push) Failing after 3m43s
Reviewed-on: #107
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from django.contrib.auth import admin
|
||||
from django.contrib.auth.admin import UserAdmin
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.safestring import mark_safe
|
||||
from unfold.admin import ModelAdmin
|
||||
|
||||
@@ -160,6 +160,7 @@ class AutoEvaluationListAppraisersView(GenericAPIView):
|
||||
@extend_schema(tags=["AutoEvaluation"])
|
||||
class GetArchivedAutoEvaluationListAPIView(ListAPIView):
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
def get_queryset(self):
|
||||
return AutoEvaluationModel.objects.filter(is_archived=True)
|
||||
|
||||
@@ -172,4 +173,6 @@ class ArchivedAutoEvaluation(APIView):
|
||||
auto_evaluation = get_object_or_404(AutoEvaluationModel, pk=pk)
|
||||
auto_evaluation.is_archived = request.data["is_archived"]
|
||||
auto_evaluation.save()
|
||||
return Response({"success": True}, status=200)
|
||||
return Response({"success": True,
|
||||
"status": auto_evaluation.status,
|
||||
"id": auto_evaluation.pk}, status=200)
|
||||
|
||||
@@ -265,6 +265,9 @@ class ArchivedReqEvaluation(APIView):
|
||||
req_evaluation = get_object_or_404(EvaluationrequestModel, pk=pk)
|
||||
req_evaluation.is_archived = request.data["is_archived"]
|
||||
req_evaluation.save()
|
||||
|
||||
return Response({"success": True,
|
||||
"status": req_evaluation.status,
|
||||
"id": req_evaluation.pk}, status=200)
|
||||
"id": req_evaluation.pk})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user