dont fail on unknown Ox ids
This commit is contained in:
parent
47c821c34a
commit
23ab4260ed
3 changed files with 9 additions and 1 deletions
3
README
3
README
|
@ -23,3 +23,6 @@ Install rabbitmq and carrot:
|
|||
sudo rabbitmqctl set_permissions -p /oxdata oxdata ".*" ".*" ".*"
|
||||
|
||||
|
||||
Deploy:
|
||||
adduser --disabled-password --disabled-login --home /srv/oxdata/ oxdata
|
||||
|
||||
|
|
|
@ -16,7 +16,10 @@ def get_movie_id(request):
|
|||
if len(movieId) == 7:
|
||||
movie_id = models.getMovieIdByImdbId(imdb_id=movieId)
|
||||
else:
|
||||
movie_id = models.MovieId.objects.get(oxdb_id=movieId)
|
||||
try:
|
||||
movie_id = models.MovieId.objects.get(oxdb_id=movieId)
|
||||
except models.MovieId.DoesNotExist:
|
||||
movie_id = None
|
||||
if 'imdb' in request.GET:
|
||||
movieId = request.GET['imdb']
|
||||
movie_id = models.getMovieIdByImdbId(imdb_id=movieId)
|
||||
|
|
|
@ -2,4 +2,6 @@
|
|||
South
|
||||
-e bzr+http://code.0x2620.org/python-oxdjango/#egg=python-oxdjango
|
||||
-e bzr+http://code.0x2620.org/python-ox/#egg=python-ox
|
||||
chardet
|
||||
django-celery
|
||||
gunicorn
|
||||
|
|
Loading…
Reference in a new issue