Skip to content

Commit 2e38937

Browse files
author
Richard Jones
committed
don't add a query to a user's list if it's already there
1 parent 9006f24 commit 2e38937

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Fixed:
77
for Multilink and Link form fields (sf bug 904072)
88
- made errors from bad input in the quick "Show issue:" form more
99
user-friendly (sf bug 904064)
10+
- don't add a query to a user's list if it's already there
1011

1112

1213
2004-02-25 0.6.6

roundup/cgi/client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.130.2.13 2004-02-25 23:26:30 richard Exp $
1+
# $Id: client.py,v 1.130.2.14 2004-02-26 22:20:43 richard Exp $
22

33
__doc__ = """
44
WWW request handler (also used in the stand-alone server).
@@ -1420,8 +1420,9 @@ def searchAction(self, wcre=re.compile(r'[\s,]+')):
14201420

14211421
# and add it to the user's query multilink
14221422
queries = self.db.user.get(self.userid, 'queries')
1423-
queries.append(qid)
1424-
self.db.user.set(self.userid, queries=queries)
1423+
if qid not in queries:
1424+
queries.append(qid)
1425+
self.db.user.set(self.userid, queries=queries)
14251426

14261427
# commit the query change to the database
14271428
self.db.commit()

0 commit comments

Comments
 (0)