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