Bug fix for 'no value' in P31

This commit is contained in:
Edward Betts 2021-05-15 14:08:24 +02:00
parent 0cb60ee604
commit f11b440b3f

View file

@ -331,6 +331,9 @@ def get_isa_count(items):
for item in items: for item in items:
isa_list = item.get_claim("P31") isa_list = item.get_claim("P31")
for isa in isa_list: for isa in isa_list:
if not isa:
print("missing IsA:", item.qid)
continue
isa_count[isa["id"]] += 1 isa_count[isa["id"]] += 1
return isa_count.most_common() return isa_count.most_common()