Fix bugs in search (string conversion)
This commit is contained in:
parent
5077ab0a30
commit
919e9a5575
|
@ -44,7 +44,10 @@ class Search(Index):
|
||||||
|
|
||||||
posts = []
|
posts = []
|
||||||
for post_id in post_list:
|
for post_id in post_list:
|
||||||
|
try:
|
||||||
post = Post.objects.get(pk=post_id)
|
post = Post.objects.get(pk=post_id)
|
||||||
|
except:
|
||||||
|
continue
|
||||||
if not post is None:
|
if not post is None:
|
||||||
posts.append(post)
|
posts.append(post)
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ class Search:
|
||||||
def _index_post(self, blog, post, saveDatabase=True):
|
def _index_post(self, blog, post, saveDatabase=True):
|
||||||
hashtable = self._loadDatabase(blog)
|
hashtable = self._loadDatabase(blog)
|
||||||
|
|
||||||
filename = blog.src_path + '/_post/' + post
|
filename = blog.src_path + '/_post/' + str(post)
|
||||||
|
|
||||||
if hashtable is None:
|
if hashtable is None:
|
||||||
return self.create_index(blog)
|
return self.create_index(blog)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user