Code

query saving fix
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Sun, 29 Feb 2004 01:16:03 +0000 (01:16 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Sun, 29 Feb 2004 01:16:03 +0000 (01:16 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2130 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/cgi/actions.py

index 1f57ff8e63b14aa0852befa329b82fbb3fa43893..46ff0e8b81d6689158d0b6098497e7994ffecbcc 100755 (executable)
@@ -143,8 +143,9 @@ class SearchAction(Action):
 
             # 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()