Skip to content

Commit 2e2101b

Browse files
fix check_uo
1 parent 6d9429b commit 2e2101b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

CHANGES.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Changelog
44
6.3.14 (unreleased)
55
-------------------
66

7-
- Nothing changed yet.
7+
- Fix check_uo to properly check empty rich text in competenze
8+
[lucabel]
89

910

1011
6.3.13 (2025-10-31)

src/design/plone/contenttypes/browser/utils/check_uo.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from DateTime import DateTime
2+
from design.plone.contenttypes.utils import text_in_block
23
from openpyxl import Workbook
34
from openpyxl.styles import Alignment
45
from openpyxl.styles import Font
@@ -46,10 +47,7 @@ def information_dict(self, uo):
4647
sede_ref = sede_ref[0]
4748

4849
competenze = getattr(uo, "competenze", "")
49-
if competenze:
50-
res = [x.get("text", "") for x in competenze["blocks"].values()]
51-
if not [x for x in res if x]:
52-
competenze = ""
50+
competenze = text_in_block(competenze)
5351
return {
5452
"description": getattr(uo, "description", "").strip(),
5553
"competenze": competenze,

0 commit comments

Comments
 (0)