only update itemsort if name is changed
This commit is contained in:
parent
22f83288c5
commit
e3c5ab18c7
2 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,6 @@ class Person(models.Model):
|
||||||
self.sortsortname = utils.sort_string(self.sortname)
|
self.sortsortname = utils.sort_string(self.sortname)
|
||||||
self.numberofnames = len(self.name.split(' '))
|
self.numberofnames = len(self.name.split(' '))
|
||||||
super(Person, self).save(*args, **kwargs)
|
super(Person, self).save(*args, **kwargs)
|
||||||
tasks.update_itemsort.delay(self.id)
|
|
||||||
|
|
||||||
def update_itemsort(self):
|
def update_itemsort(self):
|
||||||
item.models.Facet.objects.filter(
|
item.models.Facet.objects.filter(
|
||||||
|
|
|
@ -37,6 +37,7 @@ def editName(request, data):
|
||||||
person.sortname = data['sortname']
|
person.sortname = data['sortname']
|
||||||
person.edited = True
|
person.edited = True
|
||||||
person.save()
|
person.save()
|
||||||
|
tasks.update_itemsort.delay(person.id)
|
||||||
tasks.update_file_paths.delay(person.id)
|
tasks.update_file_paths.delay(person.id)
|
||||||
add_changelog(request, data)
|
add_changelog(request, data)
|
||||||
response['data'] = person.json()
|
response['data'] = person.json()
|
||||||
|
|
Loading…
Reference in a new issue