diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1b1b4260d..5b1fadcbd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ default_language_version: minimum_pre_commit_version: "1.20.0" repos: - repo: https://github.com/adamchainz/django-upgrade - rev: 1.18.0 + rev: 1.19.0 hooks: - id: django-upgrade args: [--target-version, "4.2"] @@ -28,7 +28,7 @@ repos: - --skip-glob - "**/migrations/*.py" - repo: https://github.com/sirosen/check-jsonschema - rev: 0.28.6 + rev: 0.29.0 hooks: - id: check-github-workflows - id: check-readthedocs diff --git a/feder/__init__.py b/feder/__init__.py index 0f075c09c..928e7ea25 100644 --- a/feder/__init__.py +++ b/feder/__init__.py @@ -1,5 +1,5 @@ # PEP 396: The __version__ attribute's value SHOULD be a string. -__version__ = "1.5.17" +__version__ = "1.5.18" # Compatibility to eg. django-rest-framework diff --git a/feder/letters/models.py b/feder/letters/models.py index 640e2deab..60b30abfc 100644 --- a/feder/letters/models.py +++ b/feder/letters/models.py @@ -608,9 +608,14 @@ def normalized_answer_is_up_to_date(self): and self.case.monitoring.normalized_response_template_created is not None and self.normalized_answer_created > self.case.monitoring.normalized_response_template_created - and self.normalized_answer_created - > self.case.monitoring.letter_normalization_prompt_extension_modified ): + if ( + self.case.monitoring.letter_normalization_prompt_extension_modified + is not None + and self.case.monitoring.letter_normalization_prompt_extension_modified + > self.normalized_answer_created + ): + return False return True return False diff --git a/feder/monitorings/views.py b/feder/monitorings/views.py index 958d17867..c3f1efc0f 100644 --- a/feder/monitorings/views.py +++ b/feder/monitorings/views.py @@ -774,20 +774,12 @@ def get_excel_workbook(self, monitoring_responses_data): r_data["answer"] = questions[key].get( NORMALIZED_RESPONSE_ANSWER_KEY, "" ) - r_data["manual_answer"] = "" - r_data["final_answer"] = "" r_data["answer_category"] = questions[key].get( NORMALIZED_RESPONSE_ANSWER_CATEGORY_KEY, "" ) - r_data["manual_answer_category"] = "" - r_data["final_answer_category"] = "" - ws.append([r_data[k] for k in (info_keys + question_keys)]) + ws.append([r_data.get(k, "") for k in (info_keys + question_keys)]) else: - r_data["question_no"] = "" - r_data["question"] = "" - r_data["answer"] = "" - r_data["answer_category"] = "" - ws.append([r_data[k] for k in (info_keys + question_keys)]) + ws.append([r_data.get(k, "") for k in (info_keys + question_keys)]) ws.auto_filter.ref = ws.dimensions return wb diff --git a/package-lock.json b/package-lock.json index 21c2680e1..5c8eacd92 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "datatables.net-plugins": "^1.13.6", "font-awesome": "^4.7.0", "jquery": "^3.7.0", - "postcss": "8.4.38" + "postcss": "8.4.39" }, "devDependencies": { "gulp": "^4.0.0", @@ -702,9 +702,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001638", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001638.tgz", - "integrity": "sha512-5SuJUJ7cZnhPpeLHaH0c/HPAnAHZvS6ElWyHK9GSIbVOQABLzowiI2pjmpvZ1WEbkyz46iFd4UXlOHR5SqgfMQ==", + "version": "1.0.30001642", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001642.tgz", + "integrity": "sha512-3XQ0DoRgLijXJErLSl+bLnJ+Et4KqV1PY6JJBGAFlsNsz31zeAIncyeZfLCabHK/jtSh+671RM9YMldxjUPZtA==", "dev": true, "funding": [ { @@ -4196,9 +4196,10 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", @@ -4304,9 +4305,9 @@ } }, "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "version": "8.4.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz", + "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", "funding": [ { "type": "opencollective", @@ -4321,9 +4322,10 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.0", + "picocolors": "^1.0.1", "source-map-js": "^1.2.0" }, "engines": { @@ -4838,9 +4840,9 @@ } }, "node_modules/sass": { - "version": "1.77.6", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.6.tgz", - "integrity": "sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==", + "version": "1.77.8", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.8.tgz", + "integrity": "sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index cfaae656f..520bde158 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "datatables.net-plugins": "^1.13.6", "font-awesome": "^4.7.0", "jquery": "^3.7.0", - "postcss": "8.4.38" + "postcss": "8.4.39" }, "devDependencies": { "gulp": "^4.0.0", diff --git a/requirements/base.txt b/requirements/base.txt index 255e032c1..3866a4c68 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,5 @@ # Production and staging Django -Django==4.2.13 +Django==4.2.14 # Database adapter mysqlclient==2.2.4 @@ -15,7 +15,7 @@ django-crispy-forms==1.14.0 django-model-utils==4.5.1 # Images -Pillow==10.3.0 +Pillow==10.4.0 # For user registration, either via email or social # Well-built with regular release cycles! @@ -92,9 +92,9 @@ html2text==2024.2.26 openpyxl==3.1.3 # LLM exvaluation -langchain==0.2.6 -langchain-community==0.2.6 +langchain==0.2.9 +langchain-community==0.2.7 #langchain[llms]==0.1.5 -openai==1.35.6 -langchain-openai==0.1.10 +openai==1.35.14 +langchain-openai==0.1.17 tiktoken==0.7.0 diff --git a/requirements/dev.txt b/requirements/dev.txt index 8f129b23d..74e4e855e 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,9 +1,9 @@ # Local development dependencies go here -r base.txt -Sphinx==7.3.7 +Sphinx==7.4.5 sphinx-rtd-theme==2.0.0 Werkzeug==3.0.3 -django-debug-toolbar==4.4.2 +django-debug-toolbar==4.4.6 ipdb==0.13.13 factory-boy==3.3.0 django-coverage-plugin==3.1.0 diff --git a/requirements/production.txt b/requirements/production.txt index 8062ad4f4..f3404ebbe 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -4,4 +4,4 @@ # Django==3.2.23 gevent==24.2.1 gunicorn==22.0.0 -sentry-sdk==2.7.1 +sentry-sdk==2.10.0