forked from 0x2620/pandora
update paths after changing name, fixes #1013
This commit is contained in:
parent
83b71b6c3c
commit
0fe1786ec0
2 changed files with 10 additions and 0 deletions
|
|
@ -9,3 +9,11 @@ import models
|
|||
def update_itemsort(id):
|
||||
p = models.Person.objects.get(pk=id)
|
||||
p.update_itemsort()
|
||||
|
||||
@task(ignore_results=True, queue='default')
|
||||
def update_file_paths(id):
|
||||
from item.models import Item
|
||||
from item.tasks import update_file_paths
|
||||
p = models.Person.objects.get(pk=id)
|
||||
for i in Item.objects.filter(find__value__icontains=p.name).distinct():
|
||||
update_file_paths(i.itemId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue