From 844d25008be2b3f451e892dd2f28dc37b5f2b8f3 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 3 Jun 2018 13:59:35 +0200 Subject: [PATCH] int or str --- oxdata/movie/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oxdata/movie/views.py b/oxdata/movie/views.py index c6a15f2..4bbbc52 100644 --- a/oxdata/movie/views.py +++ b/oxdata/movie/views.py @@ -28,6 +28,8 @@ actions.register(getIds) def getData(request, data): response = json_response() id = data['id'] + if isinstance(id, int): + id = str(id) if len(id) == 7: i, created = models.Imdb.objects.get_or_create(imdb=id) if created: