You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/09/17 21:57:59 UTC
[32/50] git commit: [#6545] Remove hint() - no longer needed
[#6545] Remove hint() - no longer needed
Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/657d5101
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/657d5101
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/657d5101
Branch: refs/heads/cj/6422
Commit: 657d5101a7f31aba1643c35a36855ecdeae8c2ed
Parents: d6648e1
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Tue Sep 10 15:22:17 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Sep 10 15:22:17 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/discuss.py | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/657d5101/Allura/allura/model/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/discuss.py b/Allura/allura/model/discuss.py
index e227b47..03c991e 100644
--- a/Allura/allura/model/discuss.py
+++ b/Allura/allura/model/discuss.py
@@ -97,13 +97,7 @@ class Discussion(Artifact, ActivityObject):
status='ok'
))\
.sort('timestamp', pymongo.DESCENDING)\
- .limit(1)\
- .hint([('discussion_id', pymongo.ASCENDING),
- ('status', pymongo.ASCENDING),
- ('timestamp', pymongo.ASCENDING),
- ])
- # hint is to try to force the index to be used, since mongo wouldn't select it sometimes
- # https://groups.google.com/forum/#!topic/mongodb-user/0TEqPfXxQU8
+ .limit(1)
return q.first()
def url(self):