Skip to content

Commit

Permalink
fix: SQlite base path not detected correctly (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogervila committed Jun 28, 2023
1 parent e56ca4f commit 91f6eda
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions equipment/framework/Connection/SQLiteConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ def connect(self) -> bool:
try:
schema = self.config.get(self.name, 'schema')
path = self.config.get(self.name, 'path')
base_path = os.path.join(os.getcwd(), '../') if os.path.isfile(os.path.join(os.getcwd(), 'alembic.ini')) else os.getcwd()

db = path if path == self.memory else os.path.join(
os.path.dirname(os.path.realpath(__file__)),
'../../',
base_path,
path
)

Expand Down

1 comment on commit 91f6eda

@vercel
Copy link

@vercel vercel bot commented on 91f6eda Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

equipment – ./

equipment-git-main-rogervila.vercel.app
equipment-rogervila.vercel.app
equipment-python.vercel.app

Please sign in to comment.