mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 16:44:54 +00:00
add message for blank search
This commit is contained in:
@ -223,6 +223,8 @@ class AddJuniorAPIView(viewsets.ModelViewSet):
|
||||
junior.guardian_code.append(guardian.guardian_code)
|
||||
else:
|
||||
return "Max"
|
||||
if junior.guardian_code_status and ('-' in junior.guardian_code_status):
|
||||
junior.guardian_code_status.remove('-')
|
||||
if not junior.guardian_code_status:
|
||||
junior.guardian_code_status = [str(NUMBER['two'])]
|
||||
else:
|
||||
@ -355,6 +357,8 @@ class JuniorTaskListAPIView(viewsets.ModelViewSet):
|
||||
try:
|
||||
status_value = self.request.GET.get('status')
|
||||
search = self.request.GET.get('search')
|
||||
if search.strip() == '':
|
||||
return custom_error_response(ERROR_CODE['2083'], response_status=status.HTTP_400_BAD_REQUEST)
|
||||
if search and str(status_value) == '0':
|
||||
# search with title and for all task list
|
||||
queryset = JuniorTask.objects.filter(junior__auth=request.user,
|
||||
|
||||
Reference in New Issue
Block a user