From ab1e1aab756c0f0441c5eaa773eb1461176f3bf3 Mon Sep 17 00:00:00 2001 From: saintlyzero Date: Wed, 16 Sep 2020 19:30:03 +0530 Subject: [PATCH] append new line in cp_models --- aerich/migrate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aerich/migrate.py b/aerich/migrate.py index 3654001..2e0385b 100644 --- a/aerich/migrate.py +++ b/aerich/migrate.py @@ -166,7 +166,7 @@ class Migrate: ret = re.sub(pattern, rf"\2{cls.diff_app}\4\5", content) mode = "w" if i == 0 else "a" with open(old_model_file, mode, encoding="utf-8") as f: - f.write(ret) + f.write(f"{ret}\n") @classmethod def _get_migrate_config(cls, config: dict, app: str, location: str):