diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b4ab1c2e..b10f5fc8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,13 +8,13 @@ default_stages: [commit, push] repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.6.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 24.4.2 hooks: - id: black # args: ["--line-length=88", "--check", "--diff", "--force-exclude=migrations", "src/"] @@ -22,7 +22,7 @@ repos: types: [python] entry: black - repo: https://github.com/PyCQA/flake8.git - rev: "6.1.0" + rev: "7.0.0" hooks: - id: flake8 name: flake8 @@ -31,7 +31,7 @@ repos: types: [python] args: ["--max-complexity=30", "--max-line-length=88", "--ignore=DJ01,DJ08,W503,ANN101", "--exclude=docs/*", "src/", "setup.py"] - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort name: isort (python) diff --git a/CHANGES.rst b/CHANGES.rst index ea555f80..3de8e52a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,8 @@ Changelog 6.2.10 (unreleased) ------------------- -- Nothing changed yet. +- Add importi_viaggio_servizio field as block field in Incarico response + [eikichi18] 6.2.9 (2024-05-21) diff --git a/src/design/plone/contenttypes/restapi/serializers/summary.py b/src/design/plone/contenttypes/restapi/serializers/summary.py index ac587ef2..19bba858 100644 --- a/src/design/plone/contenttypes/restapi/serializers/summary.py +++ b/src/design/plone/contenttypes/restapi/serializers/summary.py @@ -325,6 +325,13 @@ def __call__(self, **kwargs): else: res["compensi"] = json_compatible([]) + if "importi_viaggio_servizio" not in res: + res["importi_viaggio_servizio"] = json_compatible( + self.context.importi_viaggio_servizio + ) + else: + res["importi_viaggio_servizio"] = json_compatible([]) + if safe_hasattr(self.context, "compensi-file"): compensi_folder = getattr(self.context, "compensi-file") res["compensi_file"] = []