fix problem when links are deprecated
parent
151f659da6
commit
e70d580aea
|
@ -90,8 +90,10 @@ class ProblemPublishersView(generic.TemplateView):
|
||||||
recent_check__isnull=True).exclude(
|
recent_check__isnull=True).exclude(
|
||||||
recent_check__return_code__exact=200)
|
recent_check__return_code__exact=200)
|
||||||
for link in problinks:
|
for link in problinks:
|
||||||
pub = link.items.filter(status=1).first().publisher_name
|
first_item = link.items.filter(status=1).first()
|
||||||
probpubs[pub] = probpubs.get(pub, 0) + 1
|
if first_item:
|
||||||
|
pub = first_item.publisher_name
|
||||||
|
probpubs[pub] = probpubs.get(pub, 0) + 1
|
||||||
pubs = sorted(probpubs.items(), key=lambda x: x[0])
|
pubs = sorted(probpubs.items(), key=lambda x: x[0])
|
||||||
def fixempty(publist):
|
def fixempty(publist):
|
||||||
for k, v in publist:
|
for k, v in publist:
|
||||||
|
|
Loading…
Reference in New Issue