X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/81f5e7445d649ead05b4d3d0a15b742444cd8b06..049c5959e33d29e4c0044c235d291144d49d3c45:/src/cover/utils.py?ds=inline 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'