Skip to content

Commit

Permalink
blacked
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Jun 26, 2024
1 parent 0e47f24 commit d0e682e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def __call__(self, version=None, include_items=True):
@adapter(IDexterityContainer, IDesignPloneContenttypesLayer)
class SerializeFolderToJson(BaseFolderSerializer, MetaTypeSerializer):
def __call__(self, version=None, include_items=True):

result = super(SerializeFolderToJson, self).__call__(
version=version, include_items=include_items
)
Expand Down
24 changes: 12 additions & 12 deletions src/design/plone/contenttypes/restapi/services/types/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,25 +185,25 @@ def customize_venue_schema(self, result):
}
if "city" in result["properties"]:
if not result["properties"]["city"].get("default", ""):
result["properties"]["city"]["default"] = (
api.portal.get_registry_record(
"city", interface=IGeolocationDefaults
)
result["properties"]["city"][
"default"
] = api.portal.get_registry_record(
"city", interface=IGeolocationDefaults
)
if "zip_code" in result["properties"]:
if not result["properties"]["zip_code"].get("default", ""):
result["properties"]["zip_code"]["default"] = (
api.portal.get_registry_record(
"zip_code", interface=IGeolocationDefaults
)
result["properties"]["zip_code"][
"default"
] = api.portal.get_registry_record(
"zip_code", interface=IGeolocationDefaults
)

if "street" in result["properties"]:
if not result["properties"]["street"].get("default", ""):
result["properties"]["street"]["default"] = (
api.portal.get_registry_record(
"street", interface=IGeolocationDefaults
)
result["properties"]["street"][
"default"
] = api.portal.get_registry_record(
"street", interface=IGeolocationDefaults
)

if "geolocation" in result["properties"]:
Expand Down
6 changes: 5 additions & 1 deletion src/design/plone/contenttypes/upgrades/to_730x.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ def to_7304(context):

def to_7305(context):
mapping = SUBFOLDERS_MAPPING["Servizio"]
mapping = [folder for folder in mapping.get('content') if folder["id"] == "modulistica"][0] # noqa
mapping = [
folder for folder in mapping.get("content") if folder["id"] == "modulistica"
][
0
] # noqa
brains = api.content.find(portal_type="Servizio")
tot = len(brains)
i = 0
Expand Down

0 comments on commit d0e682e

Please sign in to comment.