Start PostgreSQL URI path with a '/'
Since https://github.com/python/cpython/issues/76960 if the path of the URI does not start with a '/', the netloc is removed. Closes #13543 (grafted from 6d420b9f4bffc77dc599abff4b7f8e17a061542d) --HG-- branch : 7.0
This commit is contained in:
1 parent
a026cd28c6
commit
23d99e113c
1 file changed
+1
-1
@@ -245,7 +245,7 @@ class Database(DatabaseInterface):
|
||||
if uri.path and uri.path != '/':
|
||||
warnings.warn("The path specified in the URI will be overridden")
|
||||
params = {
|
||||
'dsn': uri._replace(path=name).geturl(),
|
||||
'dsn': uri._replace(path='/' + name).geturl(),
|
||||
'fallback_application_name': os.environ.get(
|
||||
'TRYTOND_APPNAME', 'trytond'),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user