Skip to content

Commit f0662a4

Browse files
committed
Fix bugs
1 parent 6a5dd18 commit f0662a4

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/.idea
22
logs
3-
data.db
3+
sqlite
4+
*.db
45
stocks.json
56
.env

tfinance/database.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from pathlib import Path
33

44
from models import User
5-
from tfinance.config import DATABASE_NAME
5+
from config import DATABASE_NAME
66

77

88
def singleton(cls):
@@ -25,7 +25,7 @@ class Database:
2525
def __init__(self):
2626
# Подключение к БД с отключенной проверкой потока.
2727
Path("sqlite").mkdir(exist_ok=True)
28-
self.con = sqlite3.connect(f"{DATABASE_NAME}.db", check_same_thread=False)
28+
self.con = sqlite3.connect(f"sqlite/{DATABASE_NAME}.db", check_same_thread=False)
2929
self.cur = self.con.cursor()
3030
self.setup()
3131

tfinance/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
from game import game_menu, game_results, higher_game, lower_game
2828
from graphics.visualize import do_stock_image
2929
from stock import check_stock, get_all_stocks, load_stocks
30-
from tfinance.config import BOT_TOKEN, TIMEZONE
30+
from config import BOT_TOKEN, TIMEZONE
3131

3232
# Запускаем логирование
3333
logs_path = Path("logs")

0 commit comments

Comments
 (0)