diff --git a/ckanext/pages/actions.py b/ckanext/pages/actions.py index 9778f52..461d172 100644 --- a/ckanext/pages/actions.py +++ b/ckanext/pages/actions.py @@ -23,7 +23,7 @@ def __init__(self): def handle_starttag(self, tag, attrs): if tag == 'img' and not self.first_image: - self.first_image = dict(attrs)['src'] + self.first_image = dict(attrs).get('src') def _pages_show(context, data_dict):