From b02aa2535c7b7beacbc2d7d24d8522fa596afeee Mon Sep 17 00:00:00 2001 From: Parker Berberian Date: Tue, 20 Nov 2018 11:19:55 -0500 Subject: Fixed Misc Bugs Some corner cases that cause issues recently came to our attention. Fixes issues in the booking workflow and the Notification system. Change-Id: Ie16118ba1bdbeff86bb41a16dc783337b921d527 Signed-off-by: Parker Berberian --- dashboard/src/notifier/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dashboard/src/notifier/views.py') diff --git a/dashboard/src/notifier/views.py b/dashboard/src/notifier/views.py index c1a2f7e..4ee757f 100644 --- a/dashboard/src/notifier/views.py +++ b/dashboard/src/notifier/views.py @@ -17,7 +17,7 @@ def InboxView(request): else: return render(request, "dashboard/login.html", {'title': 'Authentication Required'}) - return render(request, "notifier/inbox.html", {'notifications': Notification.objects.filter(recipient=user.userprofile)}) + return render(request, "notifier/inbox.html", {'notifications': Notification.objects.filter(recipients=user.userprofile)}) def NotificationView(request, notification_id): @@ -27,7 +27,7 @@ def NotificationView(request, notification_id): return render(request, "dashboard/login.html", {'title': 'Authentication Required'}) notification = Notification.objects.get(id=notification_id) - if user not in notification.recipients: + if user.userprofile not in notification.recipients.all(): return render(request, "dashboard/login.html", {'title': 'Access Denied'}) return render(request, "notifier/notification.html", {'notification': notification}) -- cgit 1.2.3-korg