forked from 0x2620/pandora
another place sort is required now
This commit is contained in:
parent
e8a13b4e4d
commit
91a7c0cede
1 changed files with 6 additions and 1 deletions
|
@ -209,7 +209,7 @@ def download_media(item_id, url):
|
|||
@task(queue='default')
|
||||
def move_media(data, user):
|
||||
from changelog.models import add_changelog
|
||||
from item.models import get_item, Item
|
||||
from item.models import get_item, Item, ItemSort
|
||||
from item.utils import is_imdb_id
|
||||
from annotation.models import Annotation
|
||||
|
||||
|
@ -229,6 +229,11 @@ def move_media(data, user):
|
|||
i = get_item(data, user=user)
|
||||
else:
|
||||
i = get_item({'imdbId': data['public_id']}, user=user)
|
||||
try:
|
||||
i.sort
|
||||
except ItemSort.DoesNotExist:
|
||||
i.update_sort()
|
||||
|
||||
changed = [i.public_id]
|
||||
old_item = None
|
||||
for f in models.File.objects.filter(oshash__in=data['ids']):
|
||||
|
|
Loading…
Reference in a new issue