fix tasks.update_info
This commit is contained in:
parent
5005fddf69
commit
f433495592
1 changed files with 2 additions and 1 deletions
|
@ -82,10 +82,11 @@ def update_files(user, volume, files):
|
|||
|
||||
@task(ignore_results=True, queue='default')
|
||||
def update_info(user, info):
|
||||
user = models.User.objects.get(username=user)
|
||||
files = models.File.objects.filter(oshash__in=info.keys())
|
||||
for f in files:
|
||||
if not f.info:
|
||||
f.update_info(data['info'][f.oshash], user)
|
||||
f.update_info(info[f.oshash], user)
|
||||
f.save()
|
||||
for i in Item.objects.filter(files__in=files).distinct():
|
||||
i.update_selected()
|
||||
|
|
Loading…
Reference in a new issue