diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 55f298c33..057f3f063 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -61,8 +61,8 @@ repos: # major breakages (e.g. pypdf 7, openai 3) for the same reason. additional_dependencies: # --- Type stubs ----------------------------------------------- - - django-stubs==6.0.3 - - djangorestframework-stubs==3.16.9 + - django-stubs==6.0.5 + - djangorestframework-stubs==3.17.0 - types-requests==2.33.0.20260408 - types-PyYAML==6.0.12.20260408 # --- Django runtime (must match requirements/base.txt) -------- diff --git a/opencontractserver/tasks/doc_tasks.py b/opencontractserver/tasks/doc_tasks.py index 152141092..2f75c095f 100644 --- a/opencontractserver/tasks/doc_tasks.py +++ b/opencontractserver/tasks/doc_tasks.py @@ -256,10 +256,10 @@ def _create_document_processed_notifications( recipients.add(document.creator) # Add corpus owners from DocumentPath data (bulk fetch to avoid N+1) - corpus_creator_ids = { - data.get("corpus__creator_id") + corpus_creator_ids: set[int] = { + data["corpus__creator_id"] for data in corpus_data - if data.get("corpus__creator_id") + if data.get("corpus__creator_id") is not None } if corpus_creator_ids: corpus_creators = User.objects.filter(pk__in=corpus_creator_ids) diff --git a/requirements/local.txt b/requirements/local.txt index d7586b38a..28ff5b17c 100644 --- a/requirements/local.txt +++ b/requirements/local.txt @@ -7,7 +7,7 @@ watchfiles==1.2.0 # https://github.com/samuelcolvin/watchfiles # ------------------------------------------------------------------------------ mypy==2.1.0 # https://github.com/python/mypy -django-stubs==6.0.4 # https://github.com/typeddjango/django-stubs +django-stubs==6.0.5 # https://github.com/typeddjango/django-stubs pytest==9.0.3 # https://github.com/pytest-dev/pytest pytest-cov==7.1.0 # https://github.com/pytest-dev/pytest-cov pytest-xdist==3.8.0 # https://github.com/pytest-dev/pytest-xdist (parallel test execution)