fix task
This commit is contained in:
parent
e0414588ba
commit
1dbdb2f03d
2 changed files with 1 additions and 2 deletions
|
@ -36,7 +36,7 @@ def get_or_create_file(volume, f):
|
||||||
file.save()
|
file.save()
|
||||||
return file
|
return file
|
||||||
|
|
||||||
def update_or_create_instance(i, volume, f):
|
def update_or_create_instance(volume, f):
|
||||||
instance = models.Instance.objects.filter(file__oshash=f['oshash'], volume=f['volume'])
|
instance = models.Instance.objects.filter(file__oshash=f['oshash'], volume=f['volume'])
|
||||||
if instance.count()>0:
|
if instance.count()>0:
|
||||||
instance = instance[0]
|
instance = instance[0]
|
||||||
|
|
|
@ -43,7 +43,6 @@ def _order_query(qs, sort, prefix='sort__'):
|
||||||
sort.append({'operator': '-', 'key': 'year'})
|
sort.append({'operator': '-', 'key': 'year'})
|
||||||
sort.append({'operator': '+', 'key': 'title'})
|
sort.append({'operator': '+', 'key': 'title'})
|
||||||
|
|
||||||
|
|
||||||
for e in sort:
|
for e in sort:
|
||||||
operator = e['operator']
|
operator = e['operator']
|
||||||
if operator != '-':
|
if operator != '-':
|
||||||
|
|
Loading…
Reference in a new issue