[ckan-changes] commit/ckan: John Glover: [1362][xs] Bug fix: clearing database should also clear search index

Bitbucket commits-noreply at bitbucket.org
Tue Sep 27 15:25:34 UTC 2011


1 new changeset in ckan:

http://bitbucket.org/okfn/ckan/changeset/af1e0457488a/
changeset:   af1e0457488a
user:        John Glover
date:        2011-09-27 17:25:07
summary:     [1362][xs] Bug fix: clearing database should also clear search index
affected #:  1 file (-1 bytes)

--- a/ckan/lib/cli.py	Tue Sep 27 14:51:31 2011 +0100
+++ b/ckan/lib/cli.py	Tue Sep 27 16:25:07 2011 +0100
@@ -79,6 +79,7 @@
         
         self._load_config()
         from ckan import model
+        import ckan.lib.search as search
 
         cmd = self.args[0]
         if cmd == 'init':
@@ -87,6 +88,7 @@
                 print 'Initialising DB: SUCCESS'
         elif cmd == 'clean' or cmd == 'drop':
             model.repo.clean_db()
+            search.clear()
             if self.verbose:
                 print 'Cleaning DB: SUCCESS'
         elif cmd == 'upgrade':

Repository URL: https://bitbucket.org/okfn/ckan/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list