Skip to content

Commit

Permalink
Fix ckan#131 pages break whole site when an <img> tag has no src attr
Browse files Browse the repository at this point in the history
  • Loading branch information
RickMoynihan committed Oct 4, 2024
1 parent ca68f37 commit e787246
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckanext/pages/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit e787246

Please sign in to comment.