fix listed_authors check
This commit is contained in:
Родитель
8ab64ca501
Коммит
ab0e0fe434
|
@ -55,7 +55,7 @@ def product_as_dict(request, product):
|
|||
# Dev environments might not have authors set.
|
||||
author = ''
|
||||
author_url = ''
|
||||
if product.listed_authors[0]:
|
||||
if product.listed_authors:
|
||||
author = product.listed_authors[0].name
|
||||
author_url = product.listed_authors[0].get_url_path()
|
||||
|
||||
|
@ -66,8 +66,8 @@ def product_as_dict(request, product):
|
|||
'preapprovalUrl': reverse('detail.purchase.preapproval',
|
||||
args=[product.app_slug]),
|
||||
'recordUrl': product.get_detail_url('record'),
|
||||
'author': author
|
||||
'author_url': author_url
|
||||
'author': author,
|
||||
'author_url': author_url,
|
||||
'icon_128_url': product.get_icon_url(128)
|
||||
}
|
||||
if product.is_premium():
|
||||
|
|
Загрузка…
Ссылка в новой задаче