Fix encoding error. (#75)

This commit is contained in:
long2ice
2020-11-08 23:00:44 +08:00
parent e399821116
commit f5dff84476
3 changed files with 14 additions and 11 deletions

View File

@@ -76,7 +76,7 @@ class Migrate:
cls.migrate_location = os.path.join(location, app)
if last_version:
content = last_version.content
with open(cls.get_old_model_file(app, location), "w") as f:
with open(cls.get_old_model_file(app, location), "w", encoding="utf-8") as f:
f.write(content)
migrate_config = cls._get_migrate_config(config, app, location)