Make empty environment variable TRYTOND_DATABASE_URI be treated as unset

This commit is contained in:
Hartmut Goebel committed 2024-01-20 22:27:07 +01:00
1 parent 6073e22d5c
commit 5a7f24617c
1 file changed
+1 -1
+1 -1
View File
@@ -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')