only update itemsort if name is changed

This commit is contained in:
j 2016-06-15 18:31:40 +02:00
parent 22f83288c5
commit e3c5ab18c7
2 changed files with 1 additions and 1 deletions

View file

@ -53,7 +53,6 @@ class Person(models.Model):
self.sortsortname = utils.sort_string(self.sortname)
self.numberofnames = len(self.name.split(' '))
super(Person, self).save(*args, **kwargs)
tasks.update_itemsort.delay(self.id)
def update_itemsort(self):
item.models.Facet.objects.filter(

View file

@ -37,6 +37,7 @@ def editName(request, data):
person.sortname = data['sortname']
person.edited = True
person.save()
tasks.update_itemsort.delay(person.id)
tasks.update_file_paths.delay(person.id)
add_changelog(request, data)
response['data'] = person.json()