AttributeError: 'list' object has no attribute 'get' (#45)

This commit is contained in:
Dag Wieers 2020-10-26 09:57:23 +01:00 committed by GitHub
parent 1fdc18f73a
commit e7c06c7966
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -539,7 +539,7 @@ class ContentApi:
nodeid=data.get('pageInfo', {}).get('nodeId'),
path=data.get('link').lstrip('/'),
channel=data.get('pageInfo', {}).get('site'),
program_title=data.get('program', {}).get('title'),
program_title=data.get('program', {}).get('title') if data.get('program') else data.get('title'),
title=data.get('title'),
description=data.get('pageInfo', {}).get('description'),
cover=data.get('image'),