Skip to content

Commit

Permalink
blacked
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Dec 5, 2024
1 parent d82c12b commit f247ad6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/design/plone/contenttypes/browser/bando.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ def retrieveContentsOfFolderDeepening(self, path_dfolder):
elif brain.Type == "File":
obj_file = brain.getObject().file
if obj_file:
dictfields[
"url"
] = f"{brain.getURL()}/@@download/file/{obj_file.filename}" # noqa E501
dictfields["url"] = (
f"{brain.getURL()}/@@download/file/{obj_file.filename}" # noqa E501
)
obj_size = obj_file.size
dictfields["filesize"] = self.getSizeString(obj_size)
elif brain.Type == "Modulo":
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 @@ -187,25 +187,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

0 comments on commit f247ad6

Please sign in to comment.