ignore invalid entries

This commit is contained in:
j 2013-02-28 21:22:22 +05:30
parent be5b7474e0
commit 55ddd65c7e

View file

@ -283,6 +283,9 @@ class Match(models.Model):
@classmethod @classmethod
def update_item(cls, item): def update_item(cls, item):
info = item.json() info = item.json()
#ignore values without title, must be invalid
if not 'title' in info:
return
data = [] data = []
if 'originalTitle' in info: if 'originalTitle' in info:
data.append({ data.append({