dont call update_matches on self inside update_matches, fixes #1496

This commit is contained in:
j 2013-07-13 10:22:37 +00:00
parent 2af2ad59b9
commit cc17a9b6a3
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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