From 1a0371e9772d30cc272aa4be059362c9f3d3837d Mon Sep 17 00:00:00 2001 From: Yasser Tahiri Date: Thu, 15 Sep 2022 23:19:18 +0100 Subject: [PATCH] Update aerich/utils.py Co-authored-by: KDH --- aerich/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aerich/utils.py b/aerich/utils.py index 7a930dd..eb86108 100644 --- a/aerich/utils.py +++ b/aerich/utils.py @@ -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], }