--- a/src/cm/notifications.py Fri Dec 11 10:29:11 2009 +0100
+++ b/src/cm/notifications.py Fri Dec 11 10:41:08 2009 +0100
@@ -21,7 +21,7 @@
activity = kwargs['instance']
if activity.type in Activity.VIEWABLE_ACTIVITIES.get('view_users'): # user activity: only viewed by managers
- notifications = Notification.objects.filter(text=None)
+ notifications = Notification.objects.filter(text=None, active=True)
for notification in notifications:
if notification.user:
from cm.security import user_has_perm # import here!
@@ -29,7 +29,7 @@
send_notification(activity, notification)
allready_notified.add(notification.user)
elif activity.type in Activity.VIEWABLE_ACTIVITIES.get('view_comments'):
- notifications = Notification.objects.filter(Q(text=activity.text) | Q(text=None))
+ notifications = Notification.objects.filter(Q(text=activity.text) | Q(text=None), active=True)
for notification in notifications:
viewable = get_viewable_comments(FakeRequest(notification.user),
Comment.objects.filter(id__in = [activity.comment.id]),
@@ -41,7 +41,7 @@
send_notification(activity, notification)
allready_notified.add(notification.user)
elif activity.type in Activity.VIEWABLE_ACTIVITIES.get('view_texts'):
- notifications = Notification.objects.filter(Q(text=activity.text) | Q(text=None))
+ notifications = Notification.objects.filter(Q(text=activity.text) | Q(text=None), active=True)
for notification in notifications:
if notification.user:
from cm.security import user_has_perm # import here!