Update src/utils/resources.py

Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
This commit is contained in:
Tagada 2023-08-22 17:11:56 +02:00 committed by GitHub
parent 32376cf18f
commit ee4d94d382
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1338,7 +1338,7 @@ class DatabaseAppResource(AppResource):
def provision_or_update(self, context: Dict = {}):
# This is equivalent to ynh_sanitize_dbid
db_user = self.app.replace("-", "_").replace(".", "_")
db_name = self.get_setting("db_name") || db_user
db_name = self.get_setting("db_name") or db_user
self.set_setting("db_name", db_name)
self.set_setting("db_user", db_user)