From cc17a9b6a31fde414e81347674c8f27d818f4451 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 13 Jul 2013 10:22:37 +0000 Subject: [PATCH] dont call update_matches on self inside update_matches, fixes #1496 --- pandora/event/models.py | 2 +- pandora/place/models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/event/models.py b/pandora/event/models.py index 08e869b5..acf02589 100644 --- a/pandora/event/models.py +++ b/pandora/event/models.py @@ -98,7 +98,7 @@ class Event(models.Model): #annotations of type event always need an event if a.get_layer().get('type') == 'event' and a.events.count() == 0: a.events.add(Event.get_or_create(a.value)) - for e in a.events.all(): + for e in a.events.exclude(id=self.id): e.update_matches() for a in matches.exclude(id__in=self.annotations.all()): #need to check again since editEvent might have been called again diff --git a/pandora/place/models.py b/pandora/place/models.py index e155e769..1df424fd 100644 --- a/pandora/place/models.py +++ b/pandora/place/models.py @@ -110,7 +110,7 @@ class Place(models.Model): #annotations of type place always need a place if a.get_layer().get('type') == 'place' and a.places.count() == 0: a.places.add(Place.get_or_create(a.value)) - for p in a.places.all(): + for p in a.places.exclude(id=self.id): p.update_matches() for a in matches.exclude(id__in=self.annotations.all()): #need to check again since editEvent might have been called again