From 568f22e2d53f565f3bcf58f1eea2ee69ec145ce4 Mon Sep 17 00:00:00 2001 From: klemek Date: Sun, 5 Jul 2026 23:06:46 +0200 Subject: [PATCH] fix: database init --- app/database.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/database.py b/app/database.py index 073ac68..5e3cd14 100644 --- a/app/database.py +++ b/app/database.py @@ -24,16 +24,12 @@ class Database: }, ) - def init(self) -> typing.Self: + def init(self) -> None: self.logger.info("Migrating database") tortoise.run_async(tortoise.migrations.api.migrate(config=self.config)) + self.logger.info("Database migrated") self.logger.info("Initializing database") tortoise.run_async( tortoise.Tortoise.init(config=self.config, _enable_global_fallback=True) ) self.logger.info("Database ready") - return self - - def __enter__(self) -> typing.Self: - - return self