incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [15/40] git commit: [#2835] ticket:288 Always use an empty string instead of None in `text` field
Date Mon, 01 Apr 2013 14:27:34 GMT
[#2835] ticket:288 Always use an empty string instead of None in `text` field


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/01c9d1ca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/01c9d1ca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/01c9d1ca

Branch: refs/heads/cj/5963
Commit: 01c9d1caf169d237b7da99c1210ca892dbdbb789
Parents: 978b241
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Fri Mar 8 11:55:54 2013 +0000
Committer: Dave Brondsema <dbrondsema@geek.net>
Committed: Tue Mar 26 20:57:37 2013 +0000

----------------------------------------------------------------------
 Allura/allura/lib/search.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/01c9d1ca/Allura/allura/lib/search.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/search.py b/Allura/allura/lib/search.py
index 44fce05..17fbf57 100644
--- a/Allura/allura/lib/search.py
+++ b/Allura/allura/lib/search.py
@@ -19,7 +19,8 @@ def solarize(obj):
     doc = obj.index()
     if doc is None: return None
     # if index() returned doc without text, assume empty text
-    doc['text'] = doc.pop('text', '')
+    if not doc.get('text'):
+        doc['text'] = ''
     return doc
 
 class SearchError(SolrError):


Mime
View raw message