[UPDT] HORILLA_API: Validation error to the 400 response

This commit is contained in:
Horilla
2025-10-03 13:46:33 +05:30
parent 5b48d23591
commit 08a710fd99

View File

@@ -446,11 +446,7 @@ class AttendanceRequestView(APIView):
employee_id=employee_id, attendance_date=attendance_date
).exists():
return Response(
{
"error": [
"Attendance for this employee on the current date already exists."
]
},
{error: list(message) for error, message in serializer.errors.items()},
status=400,
)
return Response(serializer.errors, status=404)