Skip to content

Commit

Permalink
fix: installation on site with db_name containing special chars
Browse files Browse the repository at this point in the history
  • Loading branch information
nextchamp-saqib committed Nov 25, 2024
1 parent 52725b5 commit 05f8ccb
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,14 @@ def _get_connection_string(self):
frappe.throw(f"Unsupported database type: {self.database_type}")

def get_quoted_db_name(self):
if not self.database_name:
database_name = self.database_name
if self.is_site_db:
database_name = frappe.conf.db_name
if not database_name:
return None
quote_start = self._get_ibis_backend().dialect.QUOTE_START
quote_end = self._get_ibis_backend().dialect.QUOTE_END
return f"{quote_start}{self.database_name}{quote_end}"
return f"{quote_start}{database_name}{quote_end}"

def test_connection(self, raise_exception=False):
try:
Expand Down

0 comments on commit 05f8ccb

Please sign in to comment.