Login try with no database returns uncatched error

Bug #931320 reported by Daniel Reis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Fix Released
Undecided
Unassigned

Bug Description

If you try to login and there is no database selected, the web client returns an uncatched error: "FATAL: database "None" does not exist".

Client Traceback (most recent call last):
  File "/home/erp_user/openerp/test/server/openerp/addons/web/common/http.py", line 176, in dispatch
    response["result"] = method(controller, self, **self.params)
  File "/home/erp_user/openerp/test/server/openerp/addons/web/controllers/main.py", line 392, in authenticate
    req.session.authenticate(db, login, password, env)
  File "/home/erp_user/openerp/test/server/openerp/addons/web/common/session.py", line 71, in authenticate
    uid = self.proxy('common').authenticate(db, login, password, env)
  File "/home/erp_user/openerp/test/server/openerp/addons/web/common/openerplib/main.py", line 117, in proxy
    result = self.connector.send(self.service_name, method, *args)
  File "/home/erp_user/openerp/test/server/openerp/addons/web/common/http.py", line 579, in send
    raise fault

Server Traceback (most recent call last):
  File "/home/erp_user/openerp/test/server/openerp/addons/web/common/http.py", line 560, in send
    result = openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/home/erp_user/openerp/test/server/openerp/netsvc.py", line 325, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/erp_user/openerp/test/server/openerp/service/web_services.py", line 387, in dispatch
    return fn(*params)
  File "/home/erp_user/openerp/test/server/openerp/service/web_services.py", line 398, in exp_authenticate
    res_users = pooler.get_pool(db).get('res.users')
  File "/home/erp_user/openerp/test/server/openerp/pooler.py", line 50, in get_pool
    return get_db_and_pool(db_name, force_demo, status, update_module)[1]
  File "/home/erp_user/openerp/test/server/openerp/pooler.py", line 33, in get_db_and_pool
    registry = RegistryManager.get(db_name, force_demo, status, update_module, pooljobs)
  File "/home/erp_user/openerp/test/server/openerp/modules/registry.py", line 138, in get
    update_module, pooljobs)
  File "/home/erp_user/openerp/test/server/openerp/modules/registry.py", line 150, in new
    registry = Registry(db_name)
  File "/home/erp_user/openerp/test/server/openerp/modules/registry.py", line 53, in __init__
    cr = self.db.cursor()
  File "/home/erp_user/openerp/test/server/openerp/sql_db.py", line 468, in cursor
    return Cursor(self._pool, self.dbname, serialized=serialized)
  File "/home/erp_user/openerp/test/server/openerp/sql_db.py", line 176, in __init__
    self._cnx = pool.borrow(dsn(dbname))
  File "/home/erp_user/openerp/test/server/openerp/sql_db.py", line 368, in _locked
    return fun(self, *args, **kwargs)
  File "/home/erp_user/openerp/test/server/openerp/sql_db.py", line 423, in borrow
    result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)
OperationalError: FATAL: database "None" does not exist

Related branches

Changed in openerp-web:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.