Commit 4ad3048c authored by HERBERT Ryan's avatar HERBERT Ryan

controllers/notification.py notification deletion is cascaded onto associated user_preferences

parent 93e87be5
......@@ -146,6 +146,9 @@ def delete():
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
db(db.notification.id==request.vars['id']).delete()
# Cascade the notification deletion onto associated preferences
db((db.user_preference.val==request.vars['id'])
&(db.user_preference.preference=='mail')).delete()
res = {"redirect": "notification/index",
"success": "true",
"message": "notification " + request.vars['id'] + " deleted"}
......
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