Skip to content

Commit

Permalink
Filter applications by page_url
Browse files Browse the repository at this point in the history
  • Loading branch information
amakarudze committed Jul 26, 2023
1 parent d4f074d commit 8a2394f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion applications/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ def application_detail(request, page_url, app_number):
"""
Display the details of a single application.
"""
application = Application.object.filter(number=app_number).order_by("-created").first()
application = (
Application.object.filter(number=app_number).filter(form__event__page_url=page_url).order_by("-created").first()
)
try:
score = Score.objects.get(user=request.user, application=application)
except Score.DoesNotExist:
Expand Down

0 comments on commit 8a2394f

Please sign in to comment.