diff --git a/frappe/installer.py b/frappe/installer.py index 36221d9e68..4c5475a5a1 100644 --- a/frappe/installer.py +++ b/frappe/installer.py @@ -807,9 +807,8 @@ def get_old_backup_version(sql_file_path: str) -> Version | None: """ header = get_db_dump_header(sql_file_path).split("\n") if match := re.search(r"Frappe (\d+\.\d+\.\d+)", header[0]): - backup_version = match[1] - - return Version(backup_version) if backup_version else None + return Version(match[1]) + return None def get_backup_version(sql_file_path: str) -> Version | None: