Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove wrong preview_image_link addition from blocks (de)serializers #1737

Merged
merged 3 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 src/plone/restapi/blocks_linkintegrity.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __call__(self, block):
Returns a list of internal links
"""
links = []
for field in ["url", "href", "preview_image", "preview_image_link"]:
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", "preview_image", "preview_image_link"]
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", "preview_image", "preview_image_link"]
fields = ["url", "href", "preview_image"]
disabled = os.environ.get("disable_transform_resolveuid", False)

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