diff --git a/kallithea/controllers/admin/notifications.py b/kallithea/controllers/admin/notifications.py --- a/kallithea/controllers/admin/notifications.py +++ b/kallithea/controllers/admin/notifications.py @@ -61,7 +61,7 @@ class NotificationsController(BaseContro """GET /_admin/notifications: All items in the collection""" # url('notifications') c.user = self.authuser - notif = NotificationModel().get_for_user(self.authuser.user_id, + notif = NotificationModel().query_for_user(self.authuser.user_id, filter_=request.GET.getall('type')) p = safe_int(request.GET.get('page', 1), 1) diff --git a/kallithea/model/notification.py b/kallithea/model/notification.py --- a/kallithea/model/notification.py +++ b/kallithea/model/notification.py @@ -166,7 +166,7 @@ class NotificationModel(BaseModel): log.error(traceback.format_exc()) raise - def get_for_user(self, user, filter_=None): + def query_for_user(self, user, filter_=None): """ Get notifications for given user, filter them if filter dict is given @@ -186,7 +186,7 @@ class NotificationModel(BaseModel): if filter_: q = q.filter(Notification.type_.in_(filter_)) - return q.all() + return q def mark_read(self, user, notification): try: