Skip to content

Commit fa635d3

Browse files
committed
Only show promo if it exists
1 parent eaad53e commit fa635d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

readthedocs/restapi/views/footer_views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def footer_html(request):
8888
'version_active': version.active,
8989
'version_supported': version.supported,
9090
'promo': show_promo,
91-
'promo_data': promo_obj.as_dict(),
9291
}
92+
if show_promo and promo_obj:
93+
resp_data['promo_data'] = promo_obj.as_dict()
9394
return Response(resp_data)

0 commit comments

Comments
 (0)