mhall119 has proposed merging lp:~mhall119/loco-directory/fixes-589226 into
lp:loco-directory.
Requested reviews:
loco-directory-dev (loco-directory-dev)
Related bugs:
#589226 http://loco.ubuntu.com/events/global/17/detail/ triggers 404
https://bugs.launchpad.net/bugs/589226
AnonymousUser doesn't have group associations, so calling request.user.groups,
when the user is not logged in, throws this error. I added a check that
request.user.is_authenticated() before doing that, to short-circuit the if
condition before it tries that.
--
https://code.launchpad.net/~mhall119/loco-directory/fixes-589226/+merge/26722
Your team loco-directory-dev is requested to review the proposed merge of
lp:~mhall119/loco-directory/fixes-589226 into lp:loco-directory.
=== modified file 'loco_directory/events/views.py'
--- loco_directory/events/views.py 2010-05-31 13:07:10 +0000
+++ loco_directory/events/views.py 2010-06-03 16:42:26 +0000
@@ -298,7 +298,7 @@
detailed view for a global event
"""
global_event_object = get_object_or_404(GlobalEvent, pk=global_event_id)
- add_team_event = (request.user and \
+ add_team_event = (request.user and request.user.is_authenticated() and \
request.user.groups.exclude(name__exact='ubuntu-lococouncil'))
context = {
'global_event_object': global_event_object,
_______________________________________________
Mailing list: https://launchpad.net/~loco-directory-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~loco-directory-dev
More help : https://help.launchpad.net/ListHelp