Skip to content

Commit

Permalink
renamed and excluded from search Bando subfolders
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-andreotti committed Aug 29, 2024
1 parent 860fdbc commit 232664d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/iosanita/contenttypes/events/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@
"title": "Graduatoria",
"type": "Bando Folder Deepening",
},
{"id": "documenti", "title": "Documenti", "type": "Bando Folder Deepening"},
{
"id": "altri-allegati",
"title": "Altri allegati",
"type": "Bando Folder Deepening",
},
{
"id": "adempimenti-consequenziali",
"title": "Adempimenti consequenziali",
"type": "Bando Folder Deepening",
},
],
},
"Documento": {
Expand Down Expand Up @@ -173,9 +182,10 @@ def createSubfolders(context, event):
if portal_type == "Document":
create_default_blocks(context=child)

if portal_type in ["Folder", "Document"]:
if portal_type in ["Folder", "Document", "Bando Folder Deepening"]:
child.exclude_from_search = True
child.reindexObject(idxs=["exclude_from_search"])

# select constraints
if mapping.get("allowed_types", ()):
constraints_child = ISelectableConstrainTypes(child)
Expand Down

0 comments on commit 232664d

Please sign in to comment.