Commit e3347a3c authored by HERBERT Ryan's avatar HERBERT Ryan

controllers/notification.py removed useless 'type' parameter from get_active_notifications()

parent 48a2d1fe
...@@ -181,17 +181,6 @@ def get_active_notifications(): ...@@ -181,17 +181,6 @@ def get_active_notifications():
cached = cache.ram(key, lambda: None, time_expire=None) cached = cache.ram(key, lambda: None, time_expire=None)
if not cached: if not cached:
# No cache found: query database # No cache found: query database
if (request.vars['type'] is not None):
query = db(
((db.notification.expiration >= today)
| (db.notification.expiration == None))
& (db.notification.message_type == request.vars['type'])
).select(
db.notification.ALL, db.user_preference.val,
left=db.user_preference.on(
(db.user_preference.val==db.notification.id)
&(db.user_preference.user_id==user_id)))
else :
query = db( query = db(
(db.notification.expiration >= today) | (db.notification.expiration == None) (db.notification.expiration >= today) | (db.notification.expiration == None)
).select( ).select(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment