Skip to content

Commit cda6f9c

Browse files
authored
Merge branch 'main' into issue_65475
2 parents 6693007 + 3bd50f7 commit cda6f9c

File tree

28 files changed

+363
-156
lines changed

28 files changed

+363
-156
lines changed

.github/workflows/bandit.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,16 @@ name: Security check - Bandit
33
on: push
44

55
jobs:
6-
build:
6+
analyze:
77
runs-on: ubuntu-latest
8-
8+
permissions:
9+
# required for all workflows
10+
security-events: write
11+
# only required for workflows in private repositories
12+
actions: read
13+
contents: read
914
steps:
10-
- uses: actions/checkout@v4
11-
12-
- name: Security check - Bandit
13-
uses: ioggstream/[email protected]
14-
with:
15-
project_path: src
16-
# ignore_failure: true
17-
18-
# This is optional
19-
#- name: Security check report artifacts
20-
# uses: actions/upload-artifact@v4
21-
# with:
22-
# name: Security report
23-
# path: output/security_report.txt
24-
15+
- name: Perform Bandit Analysis
16+
uses: PyCQA/bandit-action@v1
17+
with:
18+
targets: ./redturtle

.github/workflows/flake8.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010

1111
steps:
1212
# git checkout
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414

1515
# python setup
1616
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v1
17+
uses: actions/setup-python@v4
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020

.github/workflows/pyroma.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010

1111
steps:
1212
# git checkout
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414

1515
# python setup
1616
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v1
17+
uses: actions/setup-python@v4
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020

@@ -28,7 +28,7 @@ jobs:
2828
2929
# install pyroma
3030
- name: install pyroma
31-
run: pip install pyroma
31+
run: pip install pyroma==4.2
3232

3333
# run pyroma
3434
- name: run pyroma

.github/workflows/zpretty.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010

1111
steps:
1212
# git checkout
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414

1515
# python setup
1616
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v1
17+
uses: actions/setup-python@v4
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020

.isort.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[settings]
2+
profile = plone

CHANGES.rst

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,39 @@ Changelog
22
=========
33

44

5-
1.0.5 (unreleased)
5+
1.0.8 (unreleased)
66
------------------
77

88
- Add Bando serializer to return bando_state and approfondimento.
99
[cekk]
10+
- Blocco search / variante table - aggiunte le proprietà dei campi nella colonna nel serializer
11+
[mamico]
12+
- get_taxonomy_vocab non si rompe se non è presente la tassonomia richiesta.
13+
[cekk]
14+
15+
1.0.7 (2025-06-18)
16+
------------------
17+
18+
- Struttura CT: return related people as backreferences if flag is enabled in controlpanel. Re-added new "personale_correlato" field to link Persona cts manually.
19+
[daniele]
20+
21+
1.0.6 (2025-05-29)
22+
------------------
1023

24+
- Remove dependency with auslfe.farmacie.
25+
[cekk]
26+
27+
1.0.5 (2025-04-22)
28+
------------------
29+
30+
- Install collective.volto.formblocks.
31+
[cekk]
32+
- Temporary disabled tests because there is a private dependency: auslfe.farmacie.
33+
[cekk]
34+
- Fixed help label id. Added missing trnslation for related items.
35+
[daniele]
36+
- Enable kitconcept.seo for plone site.
37+
[cekk]
1138

1239
1.0.4 (2024-11-22)
1340
------------------

setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
setup(
1818
name="iosanita.contenttypes",
19-
version="1.0.5.dev0",
19+
version="1.0.8.dev0",
2020
description="An add-on for Plone",
2121
long_description=long_description,
2222
# Get more from https://pypi.org/classifiers/
@@ -54,10 +54,9 @@
5454
install_requires=[
5555
"setuptools",
5656
# -*- Extra requirements: -*-
57-
"z3c.jbot",
5857
"plone.api>=1.8.4",
5958
"plone.app.dexterity",
60-
"collective.volto.blocksfield",
59+
"collective.volto.blocksfield>=2.2.0",
6160
"collective.z3cform.datagridfield",
6261
"redturtle.volto",
6362
"redturtle.bandi",

src/iosanita/contenttypes/browser/configure.zcml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,6 @@
55
i18n_domain="iosanita.contenttypes"
66
>
77

8-
<!-- Set overrides folder for Just-a-Bunch-Of-Templates product -->
9-
<include
10-
package="z3c.jbot"
11-
file="meta.zcml"
12-
/>
13-
<browser:jbot
14-
directory="overrides"
15-
layer="iosanita.contenttypes.interfaces.IIosanitaContenttypesLayer"
16-
/>
17-
188
<!-- Publish static files -->
199
<plone:static
2010
directory="static"

src/iosanita/contenttypes/browser/overrides/.gitkeep

Whitespace-only changes.

src/iosanita/contenttypes/indexers/taxonomies.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,23 @@
33
from collective.taxonomy.interfaces import ITaxonomy
44
from plone.dexterity.interfaces import IDexterityContent
55
from plone.indexer.decorator import indexer
6-
from zope.component import getUtility
6+
from zope.component import getSiteManager
77
from zope.globalrequest import getRequest
88

99

1010
def get_taxonomy_vocab(field):
1111
request = getRequest()
12-
taxonomy = getUtility(ITaxonomy, name=f"collective.taxonomy.{field}")
13-
return taxonomy.makeVocabulary(request.get("LANGUAGE"))
12+
sm = getSiteManager()
13+
utility = sm.queryUtility(ITaxonomy, name=f"collective.taxonomy.{field}")
14+
if not utility:
15+
return None
16+
return utility.makeVocabulary(request.get("LANGUAGE"))
1417

1518

1619
def extract_taxonomies(context, field, only_leaf=False):
1720
taxonomy_voc = get_taxonomy_vocab(field)
21+
if not taxonomy_voc:
22+
return []
1823
data = []
1924
value = getattr(context, field, []) or []
2025
if not isinstance(value, list):

0 commit comments

Comments
 (0)