From d7ecd97e88dda5f1fbb04f8db36f11262f2e2232 Mon Sep 17 00:00:00 2001 From: Konstantin Mikhailov Date: Thu, 29 Sep 2022 08:09:59 +1000 Subject: [PATCH] Close connections in the init_db wrapper --- aerich/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aerich/cli.py b/aerich/cli.py index 841f8a3..072e547 100644 --- a/aerich/cli.py +++ b/aerich/cli.py @@ -30,7 +30,7 @@ def coro(f): try: loop.run_until_complete(f(*args, **kwargs)) finally: - if f.__name__ not in ["cli", "init_db", "init"]: + if f.__name__ not in ["cli", "init"]: loop.run_until_complete(Tortoise.close_connections()) return wrapper