[FIX]Fixed the issue of database list retuns blank when there is name with unicode character in postgres, due to this web-client redirects user to create database screen as there is no database comes in response of db_list.

bzr revid: msh@openerp.com-20130319070248-57cp7drh0ry0vjz7
This commit is contained in:
Mohammed Shekha 2013-03-19 12:32:48 +05:30
parent ffd258e3f0
commit b8690e58e9
1 changed files with 1 additions and 1 deletions

View File

@ -371,7 +371,7 @@ class db(netsvc.ExportService):
cr.execute("select datname from pg_database where datdba=(select usesysid from pg_user where usename=%s) and datname not in %s order by datname", (db_user, templates_list))
else:
cr.execute("select datname from pg_database where datname not in %s order by datname", (templates_list,))
res = [str(name) for (name,) in cr.fetchall()]
res = [tools.ustr(name) for (name,) in cr.fetchall()]
except Exception:
res = []
finally: