only call getId if using IMDb ids

This commit is contained in:
j 2013-02-28 20:12:52 +00:00
parent ea3197d37d
commit 92a8480d79

View file

@ -375,8 +375,9 @@ def findId(request):
response['data']['items'] = [
i.get_json(['title', 'director', 'year', 'id']) for i in qs
]
if not response['data']['items'] \
and len(data['id']) == 7 \
and settings.USE_IMDB \
and settings.DATA_SERVICE:
r = models.external_data('getId', data)
if r['status']['code'] == 200: