Update aerich/utils.py

Co-authored-by: KDH <ehdgua01@naver.com>
This commit is contained in:
Yasser Tahiri 2022-09-15 23:19:18 +01:00 committed by GitHub
parent 40c7ef7fd6
commit 1a0371e977
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,8 +97,8 @@ def get_version_content_from_file(version_file: Union[str, Path]) -> Dict:
upgrade_content = content[first + len(_UPGRADE) : second].strip() # noqa:E203
downgrade_content = content[second + len(_DOWNGRADE) :].strip() # noqa:E203
return {
"upgrade": list(filter(lambda x: x or False, upgrade_content.split(";\n"))),
"downgrade": list(filter(lambda x: x or False, downgrade_content.split(";\n"))),
"upgrade": [line for line in upgrade_content.split(";\n") if line],
"downgrade": [line for line in downgrade_content.split(";\n") if line],
}