mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
change(notify): converted to use aurweb.db ORM
- Removed notify sharness test Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
9fb1fbe32c
commit
d8e3ca1abb
7 changed files with 934 additions and 627 deletions
|
@ -239,7 +239,6 @@ def remove_comaintainers(pkgbase: models.PackageBase,
|
|||
:param usernames: Iterable of username strings
|
||||
:return: None
|
||||
"""
|
||||
conn = db.ConnectionExecutor(db.get_engine().raw_connection())
|
||||
notifications = []
|
||||
with db.begin():
|
||||
for username in usernames:
|
||||
|
@ -250,8 +249,7 @@ def remove_comaintainers(pkgbase: models.PackageBase,
|
|||
).first()
|
||||
notifications.append(
|
||||
notify.ComaintainerRemoveNotification(
|
||||
conn, comaintainer.User.ID, pkgbase.ID
|
||||
)
|
||||
comaintainer.User.ID, pkgbase.ID)
|
||||
)
|
||||
db.delete(comaintainer)
|
||||
|
||||
|
@ -283,7 +281,6 @@ def add_comaintainers(request: Request, pkgbase: models.PackageBase,
|
|||
memo[username] = user
|
||||
|
||||
# Alright, now that we got past the check, add them all to the DB.
|
||||
conn = db.ConnectionExecutor(db.get_engine().raw_connection())
|
||||
notifications = []
|
||||
with db.begin():
|
||||
for username in usernames:
|
||||
|
@ -302,7 +299,7 @@ def add_comaintainers(request: Request, pkgbase: models.PackageBase,
|
|||
|
||||
notifications.append(
|
||||
notify.ComaintainerAddNotification(
|
||||
conn, comaintainer.User.ID, pkgbase.ID)
|
||||
comaintainer.User.ID, pkgbase.ID)
|
||||
)
|
||||
|
||||
# Send out notifications.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue