Skip to content

Commit

Permalink
Swap condition in Image field indexer
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed Apr 29, 2024
1 parent 4f3f5d3 commit b11ddbe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/plone/volto/indexers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ def image_field_indexer(obj):
base_obj = aq_base(obj)

image_field = ""
if getattr(base_obj, "preview_image", False):
image_field = "preview_image"
elif (
if (
getattr(base_obj, "preview_image_link", False)
and not base_obj.preview_image_link.isBroken()
):
image_field = "preview_image_link"
elif getattr(base_obj, "preview_image", False):
image_field = "preview_image"
elif getattr(base_obj, "image", False):
image_field = "image"
return image_field
Expand Down

0 comments on commit b11ddbe

Please sign in to comment.