int or str
This commit is contained in:
parent
e22d5c5ad0
commit
844d25008b
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue