only update matches if names changed
This commit is contained in:
parent
ea518c13a6
commit
7761f97090
4 changed files with 7 additions and 4 deletions
|
|
@ -93,7 +93,7 @@ class Place(models.Model):
|
|||
self.items.remove(i)
|
||||
for i in Item.objects.filter(id__in=ids).exclude(id__in=self.items.all()):
|
||||
self.items.add(i)
|
||||
self.save()
|
||||
Place.objects.filter(id=self.id).update(matches=self.matches)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if not self.name_sort:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue