Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-schick committed Dec 15, 2023
1 parent 1ad32da commit 94595f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mara_db/dbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def sqlalchemy_url(self):
return f'mssql+pyodbc://{self.user}:{urllib.parse.quote(self.password)}@{self.host}:{port}/{self.database}?driver={driver}'

if importlib.util.find_spec("pymssql"):
return f'mssql+pymssql://{self.db.user}:{urllib.parse.quote(self.db.password)}@{self.db.host}:{port}/{self.db.database}'
return f'mssql+pymssql://{self.user}:{urllib.parse.quote(self.password)}@{self.host}:{port}/{self.database}'

raise ValueError('You need either python module pyodbc or pymssql to use sqlalchemy with SQLServerDB.')

Expand Down

0 comments on commit 94595f4

Please sign in to comment.