Permalink
Browse files

fixed catchup for anonymous users

  • Loading branch information...
1 parent 399d20c commit 9ecb33dfcdc2fe3debf618e34dfc1ad443582bdb @pigletto pigletto committed Aug 1, 2012
Showing with 3 additions and 1 deletion.
  1. +1 −1 sphenecoll/sphene/sphboard/models.py
  2. +2 −0 sphenecoll/sphene/sphboard/views.py
@@ -109,7 +109,7 @@ def __iter__(self):
try:
for ct in categorytyperegistry.get_category_type_list():
choices += ((ct.name, "%s (%s)" % (unicode(ct.label), ct.name)),)
- except:
+ except Exception, e:
# This is also called during syncdb before tables are
# created, so for this case catch all exceptions.
# see http://sct.sphene.net/board/thread/898/
@@ -11,6 +11,7 @@
from django.contrib import messages
from django.forms.models import modelformset_factory
from django.core.cache import cache
+from django.contrib.auth.decorators import login_required
from sphene.community import PermissionDenied
from sphene.community.permissionutils import has_permission_flag
@@ -891,6 +892,7 @@ def toggle_monitor(request, group, monitortype, object_id, monitor_user_id=None)
return HttpResponseRedirect(obj.get_absolute_url())
+@login_required
def catchup(request, group, category_id):
if category_id == '0':
ThreadLastVisit.objects.filter(user = request.user).delete()

0 comments on commit 9ecb33d

Please sign in to comment.