You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It only checks if there's an attr named image to state that an object has an image, but that's not always the case if a content type defined image as a method instead of an attribute, like we have in
In
https://github.com/plone/plone.app.contenttypes/blob/1.1.1/plone/app/contenttypes/browser/folder.py#L166
It only checks if there's an attr named
image
to state that an object has an image, but that's not always the case if a content type definedimage
as a method instead of an attribute, like we have inhttps://github.com/collective/collective.nitf/blob/d9367c479d9112b17690b18d3143c3f6b4c599fa/src/collective/nitf/content.py#L32
In this situation, it always returns
True
since it's a<bound method NITF.image of <NITF at
.A fix would be to add a condition asking if img is callable, call it, and check it's value as well. For example:
It would be nice if this was backported to plone.app.contenttypes 1.1.x as well, since it's still used in Plone 4.
The text was updated successfully, but these errors were encountered: