Mercurial > p > roundup > code
diff roundup/cgi/client.py @ 2055:e99367f7c11a maint-0.6
don't add a query to a user's list if it's already there
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 26 Feb 2004 22:20:43 +0000 |
| parents | f8e292e68e01 |
| children | a981d3b96397 |
line wrap: on
line diff
--- a/roundup/cgi/client.py Wed Feb 25 23:26:30 2004 +0000 +++ b/roundup/cgi/client.py Thu Feb 26 22:20:43 2004 +0000 @@ -1,4 +1,4 @@ -# $Id: client.py,v 1.130.2.13 2004-02-25 23:26:30 richard Exp $ +# $Id: client.py,v 1.130.2.14 2004-02-26 22:20:43 richard Exp $ __doc__ = """ WWW request handler (also used in the stand-alone server). @@ -1420,8 +1420,9 @@ # and add it to the user's query multilink queries = self.db.user.get(self.userid, 'queries') - queries.append(qid) - self.db.user.set(self.userid, queries=queries) + if qid not in queries: + queries.append(qid) + self.db.user.set(self.userid, queries=queries) # commit the query change to the database self.db.commit()
