From 9b84cc0f5fc15a507f89f287e1ab350fbcc49a78 Mon Sep 17 00:00:00 2001 From: Katy Baulch <46493669+katybaulch@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:48:25 +0100 Subject: [PATCH 1/3] Make one or none a first instead --- app/db/crud/document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/db/crud/document.py b/app/db/crud/document.py index 3b453f1d..1e46a6af 100644 --- a/app/db/crud/document.py +++ b/app/db/crud/document.py @@ -155,7 +155,7 @@ def get_family_and_documents(db: Session, import_id: str) -> FamilyAndDocumentsR .join(Organisation, Corpus.organisation_id == Organisation.id) .filter(Family.import_id == import_id) .filter(geo_subquery.c.family_import_id == Family.import_id) # type: ignore - ).one_or_none() + ).first() if not db_objects: _LOGGER.warning("No family found for import_id", extra={"slug": import_id}) From 6e50e912067ffe7e1829854ba4b1bae6bf8ece3b Mon Sep 17 00:00:00 2001 From: Katy Baulch <46493669+katybaulch@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:49:25 +0100 Subject: [PATCH 2/3] Add TODO --- app/db/crud/document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/db/crud/document.py b/app/db/crud/document.py index 1e46a6af..8e074c6a 100644 --- a/app/db/crud/document.py +++ b/app/db/crud/document.py @@ -155,7 +155,7 @@ def get_family_and_documents(db: Session, import_id: str) -> FamilyAndDocumentsR .join(Organisation, Corpus.organisation_id == Organisation.id) .filter(Family.import_id == import_id) .filter(geo_subquery.c.family_import_id == Family.import_id) # type: ignore - ).first() + ).first() # TODO Fix as part of PDCT-1440 if not db_objects: _LOGGER.warning("No family found for import_id", extra={"slug": import_id}) From 1e8c7f1d1c99b78987940364e18889f4e5d68c14 Mon Sep 17 00:00:00 2001 From: Katy Baulch <46493669+katybaulch@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:49:38 +0100 Subject: [PATCH 3/3] Bump to 1.17.6 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1518679b..49043000 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "navigator_backend" -version = "1.17.5" +version = "1.17.6" description = "" authors = ["CPR-dev-team "] packages = [{ include = "app" }, { include = "tests" }]