fix: check correct part of backup header
`-- Backup generated by Frappe 15.1.0 on branch fix-backup-restore` Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
parent
232da65e4c
commit
b9923571dc
1 changed files with 2 additions and 2 deletions
|
|
@ -757,8 +757,8 @@ def is_downgrade(sql_file_path, verbose=False):
|
|||
if backup_version is None:
|
||||
# This is likely an older backup, so try to extract another way
|
||||
header = get_db_dump_header(sql_file_path).split("\n")
|
||||
if "Version" in header[0]:
|
||||
backup_version = header[0].split(":")[-1].strip()
|
||||
if match := re.search(r"Frappe (\d+\.\d+\.\d+)", header[0]):
|
||||
backup_version = match.group(1)
|
||||
|
||||
# Assume it's not a downgrade if we can't determine backup version
|
||||
if backup_version is None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue