fix: Update backend normalization to match search normalization logic (#7603)

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Michael Genson
2026-05-10 21:23:57 -05:00
committed by GitHub
parent 551a92a031
commit d340fdd9df
5 changed files with 120 additions and 16 deletions

View File

@@ -1,6 +1,4 @@
import filecmp
import statistics
from pathlib import Path
from typing import Any
from sqlalchemy.orm import Session
@@ -32,17 +30,6 @@ def dict_sorter(d: dict) -> Any:
return next((d[key] for key in possible_keys if d.get(key)), 1)
# For Future Use
def match_file_tree(path_a: Path, path_b: Path):
if path_a.is_dir() and path_b.is_dir():
for a_file in path_a.iterdir():
b_file = path_b.joinpath(a_file.name)
assert b_file.exists()
match_file_tree(a_file, b_file)
else:
assert filecmp.cmp(path_a, path_b)
def test_database_backup():
backup_v2 = BackupV2()
path_to_backup = backup_v2.backup()