Skip to content

Commit

Permalink
removed useless notation __all__
Browse files Browse the repository at this point in the history
  • Loading branch information
eikichi18 committed Jun 17, 2024
1 parent b6e8eeb commit 96fe75a
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/design/plone/contenttypes/events/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
},
{"id": "esiti", "title": "Esiti", "type": "Bando Folder Deepening"},
],
"allowed_types": "__all__",
},
"Documento": {
"content": [
Expand All @@ -27,7 +26,6 @@
"allowed_types": ("Image",),
},
],
"allowed_types": "__all__",
},
"Event": {
"content": [
Expand Down Expand Up @@ -56,7 +54,6 @@
"publish": True,
},
],
"allowed_types": "__all__",
},
"Incarico": {
"content": [
Expand All @@ -82,7 +79,6 @@
"publish": True,
}
],
"allowed_types": "__all__",
},
"News Item": {
"content": [
Expand All @@ -103,7 +99,6 @@
),
},
],
"allowed_types": "__all__",
},
"Persona": {
"content": [
Expand Down Expand Up @@ -160,7 +155,6 @@
"allowed_types": ("File",),
}
],
"allowed_types": "__all__",
},
"Servizio": {
"content": [
Expand All @@ -171,13 +165,11 @@
},
{"id": "allegati", "title": "Allegati", "allowed_types": ("File", "Link")},
],
"allowed_types": "__all__",
},
"UnitaOrganizzativa": {
"content": [
{"id": "allegati", "title": "Allegati", "allowed_types": ("File",)},
],
"allowed_types": "__all__",
},
}

Expand Down Expand Up @@ -227,8 +219,8 @@ def createSubfolders(context, event):
with api.env.adopt_roles(["Reviewer"]):
api.content.transition(obj=child, transition="publish")

allowed_types = subfolders_mapping.get("allowed_types", "__all__")
if allowed_types != "__all__" and not isinstance(allowed_types, list):
allowed_types = subfolders_mapping.get("allowed_types", None)
if allowed_types is not None and not isinstance(allowed_types, list):
raise ValueError("Subfolder map is not well formed")

if isinstance(allowed_types, list):
Expand Down

0 comments on commit 96fe75a

Please sign in to comment.