Skip to content

Commit

Permalink
refactor: Remove commented code for excluding applied jobs in JobList…
Browse files Browse the repository at this point in the history
…View
  • Loading branch information
QA2A committed Sep 8, 2024
1 parent 4cd2cdb commit 0a81a99
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,13 +741,13 @@ def get_queryset(self):

if self.request.GET.get("view") == "grid":
self.template_name = "website/job_grid.html"

if self.request.user.is_authenticated:
# Exclude jobs the user has applied for
applied_jobs = Application.objects.filter(
user=self.request.user
).values_list("job_id", flat=True)
self.queryset = self.queryset.exclude(id__in=applied_jobs)
# if self.request.user.is_authenticated:
# # Exclude jobs the user has applied for
# applied_jobs = Application.objects.filter(
# user=self.request.user
# ).values_list("job_id", flat=True)
# self.queryset = self.queryset.exclude(id__in=applied_jobs)

ordering = self.request.GET.get("ordering")
if ordering and ordering.lstrip("-") in [
Expand Down

0 comments on commit 0a81a99

Please sign in to comment.