From 7a19a034b005dfed5634a9afc8ac5834f4f00fe0 Mon Sep 17 00:00:00 2001 From: Herman Snevajs Date: Thu, 21 Nov 2024 09:24:41 +0100 Subject: [PATCH] Fix tests and black --- server/mergin/sync/models.py | 4 +--- server/mergin/tests/test_db_hooks.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/server/mergin/sync/models.py b/server/mergin/sync/models.py index 123a1f30..cff88229 100644 --- a/server/mergin/sync/models.py +++ b/server/mergin/sync/models.py @@ -741,9 +741,7 @@ def __init__( latest_files_map = { fh.path: fh.id for fh in FileHistory.query.filter( - FileHistory.id.in_( - self.project.latest_project_files.file_history_ids - ) + FileHistory.id.in_(self.project.latest_project_files.file_history_ids) ).all() } diff --git a/server/mergin/tests/test_db_hooks.py b/server/mergin/tests/test_db_hooks.py index 16e7d1e3..43186c18 100644 --- a/server/mergin/tests/test_db_hooks.py +++ b/server/mergin/tests/test_db_hooks.py @@ -163,7 +163,7 @@ def test_remove_project(client, diff_project): LatestProjectFiles.query.filter_by(project_id=project_id) .first() .file_history_ids - is None + == [] ) # try to remove the deleted project