summaryrefslogtreecommitdiffstats
path: root/askbot/search
diff options
context:
space:
mode:
authorTomasz Zielinski <tomasz.zielinski@pyconsultant.eu>2012-01-29 22:52:22 +0100
committerTomasz Zielinski <tomasz.zielinski@pyconsultant.eu>2012-01-29 22:52:22 +0100
commitf0b5ced5169c863f2349ec0cd5ea6c765b472a91 (patch)
treed7d0b277aec126eb21b94184d076fd53bc962218 /askbot/search
parent92451a78e2fb5009e088beea6b741966619075ff (diff)
downloadaskbot-f0b5ced5169c863f2349ec0cd5ea6c765b472a91.tar.gz
askbot-f0b5ced5169c863f2349ec0cd5ea6c765b472a91.tar.bz2
askbot-f0b5ced5169c863f2349ec0cd5ea6c765b472a91.zip
Fixed a bug where a tag could be duplicated in the URL
Diffstat (limited to 'askbot/search')
-rw-r--r--askbot/search/state_manager.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/askbot/search/state_manager.py b/askbot/search/state_manager.py
index 232d64e9..ee46501e 100644
--- a/askbot/search/state_manager.py
+++ b/askbot/search/state_manager.py
@@ -117,7 +117,13 @@ class SearchState(object):
else:
self.sort = sort
- self.tags = [t.strip() for t in tags.split(const.TAG_SEP)] if tags else []
+ self.tags = []
+ if tags:
+ for t in tags.split(const.TAG_SEP):
+ tag = t.strip()
+ if tag not in self.tags:
+ self.tags.append(tag)
+
self.author = int(author) if author else None
self.page = int(page) if page else 1
if self.page == 0: # in case someone likes jokes :)