-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
in a template i define two tags:
<metal:row define-macro="teaser"
tal:define="
plone_view python:context.restrictedTraverse('@@plone');
obj item/getObject;
scale nocall:obj/@@images;
tag python:scale.tag('image', width=800, height=350, mode='contain', loading='lazy');
tag1 python: scale.srcset('image', width=1600, height=700, mode='contain', css_class='cover', loading='lazy', fetchpriority='high', alt=getattr(context, 'image_caption', None));
"
>
the srcset creation is broken if the imagefield is empty, the tag creation works without errors (it return None)
File "/opt/ukdd-p6.1/.venv/lib/python3.12/site-packages/plone/namedfile/scaling.py", line 803, in srcset
attributes["src"] = scale.url
^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'url'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels