X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/81f5e7445d649ead05b4d3d0a15b742444cd8b06..14f2c24a604e36cad62ba9f6f8d71bf500f8e35a:/src/cover/utils.py?ds=sidebyside diff --git a/src/cover/utils.py b/src/cover/utils.py index 56fb24a7..6815d29d 100644 --- a/src/cover/utils.py +++ b/src/cover/utils.py @@ -99,7 +99,10 @@ def get_wikimedia_data(url): entity = client.get(qitem) meta['title'] = entity.label.get('pl', str(entity.label)) author = entity.get(client.get(WIKIDATA.CREATOR)) - meta['author'] = author.label.get('pl', str(author.label)) + if author is not None: + meta['author'] = author.label.get('pl', str(author.label)) + else: + meta['author'] = '' if meta['license_name'] == 'Public domain': meta['license_name'] = 'domena publiczna'