Skip to content

Commit

Permalink
Merge branch 'main' into allow_discussion
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshat2Jain authored Dec 4, 2023
2 parents a0c6ff3 + d5b83a6 commit 0d92612
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 7 deletions.
16 changes: 16 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ Changelog
.. towncrier release notes start
9.2.0 (2023-11-23)
------------------

New features:


- Added preview_image and preview_image_link to the list of smart fields for resolveuid and link integrity. @sneridagh (#1735)


Internal:


- Does not test Python 3.7. @wesleybl (#1732)
- Use plone.recipe.precompiler to generate mo files to test. @wesleybl (#1733)


9.1.2 (2023-11-04)
------------------

Expand Down
1 change: 0 additions & 1 deletion news/1732.internal

This file was deleted.

1 change: 0 additions & 1 deletion news/1733.internal

This file was deleted.

2 changes: 2 additions & 0 deletions news/1737.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Remove wrong `preview_image_link` addition from blocks (de)serializers
[sneridagh]
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys


version = "9.1.3.dev0"
version = "9.2.1.dev0"

if sys.version_info.major == 2:
raise ValueError(
Expand Down
3 changes: 1 addition & 2 deletions src/plone/restapi/blocks_linkintegrity.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def __call__(self, block):
@adapter(IBlocks, IBrowserRequest)
@implementer(IBlockFieldLinkIntegrityRetriever)
class SlateBlockLinksRetriever:

order = 100
block_type = "slate"
field = "value"
Expand Down Expand Up @@ -111,7 +110,7 @@ def __call__(self, block):
Returns a list of internal links
"""
links = []
for field in ["url", "href"]:
for field in ["url", "href", "preview_image"]:
value = block.get(field, "")
for url in get_urls_from_value(value):
links.append(url)
Expand Down
2 changes: 1 addition & 1 deletion src/plone/restapi/deserializer/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ResolveUIDDeserializerBase:

order = 1
block_type = None
fields = ["url", "href"]
fields = ["url", "href", "preview_image"]
disabled = os.environ.get("disable_transform_resolveuid", False)

def __init__(self, context, request):
Expand Down
2 changes: 1 addition & 1 deletion src/plone/restapi/serializer/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __call__(self):
class ResolveUIDSerializerBase:
order = 1
block_type = None
fields = ["url", "href"]
fields = ["url", "href", "preview_image"]
disabled = os.environ.get("disable_transform_resolveuid", False)

def __init__(self, context, request):
Expand Down

0 comments on commit 0d92612

Please sign in to comment.