Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Marcus Andersson
aurweb
Commits
c7ff97a6
Commit
c7ff97a6
authored
Jun 08, 2015
by
Lukas Fleischer
Browse files
git-update: Avoid duplicate notifications
Fixes FS#45254. Signed-off-by:
Lukas Fleischer
<
lfleischer@archlinux.org
>
parent
8aa4c51d
Changes
1
Hide whitespace changes
Inline
Side-by-side
git-interface/git-update.py
View file @
c7ff97a6
...
...
@@ -144,8 +144,12 @@ def save_srcinfo(srcinfo, db, cur, user):
# Add user to notification list on adoption.
if
was_orphan
:
cur
.
execute
(
"INSERT INTO CommentNotify (PackageBaseID, UserID) "
+
"VALUES (%s, %s)"
,
[
pkgbase_id
,
user_id
])
cur
.
execute
(
"SELECT COUNT(*) FROM CommentNotify WHERE "
+
"PackageBaseID = %s AND UserID = %s"
,
[
pkgbase_id
,
user_id
])
if
cur
.
fetchone
()[
0
]
==
0
:
cur
.
execute
(
"INSERT INTO CommentNotify (PackageBaseID, UserID) "
+
"VALUES (%s, %s)"
,
[
pkgbase_id
,
user_id
])
db
.
commit
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment