Mercurial > kallithea
changeset 2157:6a2c0cfb018d beta
Cascade delete comments and notifications when removing user.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 22 Mar 2012 02:48:47 +0200 |
parents | a27e4d44237e |
children | edbf8c9c21d2 |
files | rhodecode/model/db.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/model/db.py Thu Mar 22 02:44:42 2012 +0200 +++ b/rhodecode/model/db.py Thu Mar 22 02:48:47 2012 +0200 @@ -307,7 +307,11 @@ group_member = relationship('UsersGroupMember', cascade='all') - notifications = relationship('UserNotification',) + notifications = relationship('UserNotification', cascade='all') + # notifications assigned to this user + user_created_notifications = relationship('Notification', cascade='all') + # comments created by this user + user_comments = relationship('ChangesetComment', cascade='all') @hybrid_property def email(self):