From 87de67be98e603ba3f85ae803e9b587023f75062 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 23 Jul 2019 17:45:30 +0200 Subject: [PATCH] one more imdb id check --- pandora/archive/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora/archive/tasks.py b/pandora/archive/tasks.py index e9cc8712..6bb34bb6 100644 --- a/pandora/archive/tasks.py +++ b/pandora/archive/tasks.py @@ -210,6 +210,7 @@ def download_media(item_id, url): def move_media(data, user): from changelog.models import add_changelog from item.models import get_item, Item + from item.utils import is_imdb_id from annotation.models import Annotation user = models.User.objects.get(username=user) @@ -218,7 +219,7 @@ def move_media(data, user): i = Item.objects.get(public_id=data['item']) else: data['public_id'] = data.pop('item').strip() - if len(data['public_id']) != 7: + if not is_imdb_id(data['public_id']): del data['public_id'] if 'director' in data and isinstance(data['director'], string_types): if data['director'] == '':