Skip to content

Commit

Permalink
Feature/pdct 1553 Make one_or_none a first in document CRUD (#372)
Browse files Browse the repository at this point in the history
* Make one or none a first instead

* Add TODO

* Bump to 1.17.6
  • Loading branch information
katybaulch authored Oct 9, 2024
1 parent 299cfab commit 1b8ccb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/db/crud/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -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() # TODO Fix as part of PDCT-1440

if not db_objects:
_LOGGER.warning("No family found for import_id", extra={"slug": import_id})
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "navigator_backend"
version = "1.17.5"
version = "1.17.6"
description = ""
authors = ["CPR-dev-team <[email protected]>"]
packages = [{ include = "app" }, { include = "tests" }]
Expand Down

0 comments on commit 1b8ccb7

Please sign in to comment.