[FIX] forbid dropping templates databases

bzr revid: chs@openerp.com-20140129103538-qbm054m29y5r4hu4
This commit is contained in:
Christophe Simonis 2014-01-29 11:35:38 +01:00
parent 4d3a623af7
commit 23778030cd
1 changed files with 1 additions and 1 deletions

View File

@ -196,7 +196,7 @@ class db(netsvc.ExportService):
raise Exception, e
def exp_drop(self, db_name):
if not self.exp_db_exist(db_name):
if db_name not in self.exp_list(True):
return False
openerp.modules.registry.RegistryManager.delete(db_name)
sql_db.close_db(db_name)