Add notifications for editing maintainers

This commit is contained in:
rubenwardy
2020-07-08 23:20:29 +01:00
parent b2809ed12e
commit 0e2ea27f54
2 changed files with 18 additions and 2 deletions

View File

@@ -190,7 +190,7 @@ def is_package_page(f):
def triggerNotif(owner, causer, title, url):
if owner.rank.atLeast(UserRank.NEW_MEMBER) and owner != causer:
Notification.query.filter_by(user=owner, url=url).delete()
Notification.query.filter_by(user=owner, causer=causer, title=title, url=url).delete()
notif = Notification(owner, causer, title, url)
db.session.add(notif)