From e3c5ab18c7ca68593a7b403ff0670b12abd417c7 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 15 Jun 2016 18:31:40 +0200 Subject: [PATCH] only update itemsort if name is changed --- pandora/person/models.py | 1 - pandora/person/views.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/person/models.py b/pandora/person/models.py index 7cf9c58ab..9055fb299 100644 --- a/pandora/person/models.py +++ b/pandora/person/models.py @@ -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( diff --git a/pandora/person/views.py b/pandora/person/views.py index e91fedc25..044468e69 100644 --- a/pandora/person/views.py +++ b/pandora/person/views.py @@ -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()