Skip to content

Commit

Permalink
Merge pull request #149 from YogeshUpdhyay/main
Browse files Browse the repository at this point in the history
Jobs queryset update
  • Loading branch information
YogeshUpdhyay authored Jan 5, 2025
2 parents 949674f + 67d51f9 commit f658cb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/jobs/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class JobViewSets(viewsets.ModelViewSet):
4. create or update job
"""

queryset = Job.objects.annotate(total_applicants=Count("applicants")).order_by('-created_at')
queryset = Job.objects.filter(is_deleted=False).annotate(total_applicants=Count("applicants")).order_by('-created_at')
serializer_class = JobSerializer
filter_backends = [filters.SearchFilter, filters.OrderingFilter, df_filters.DjangoFilterBackend]
search_fields = ["job_role", "location"]
Expand Down

0 comments on commit f658cb2

Please sign in to comment.