From 5a7f24617c71a38104eb25719df514cf9bfab394 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Sat, 20 Jan 2024 22:27:07 +0100 Subject: [PATCH] Make empty environment variable TRYTOND_DATABASE_URI be treated as unset --- trytond/trytond/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/trytond/config.py b/trytond/trytond/config.py index 617e70cb27..78d768b393 100644 --- a/trytond/trytond/config.py +++ b/trytond/trytond/config.py @@ -54,7 +54,7 @@ class TrytonConfigParser(configparser.ConfigParser): self.set('web', 'cache_timeout', str(60 * 60 * 12)) self.add_section('database') self.set('database', 'uri', - os.environ.get('TRYTOND_DATABASE_URI', 'sqlite://')) + os.environ.get('TRYTOND_DATABASE_URI') or 'sqlite://') self.set('database', 'path', os.path.join( os.path.expanduser('~'), 'db')) self.set('database', 'list', 'True')