forked from 0x2620/pandora
dont call update_matches on self inside update_matches, fixes #1496
This commit is contained in:
parent
2af2ad59b9
commit
cc17a9b6a3
2 changed files with 2 additions and 2 deletions
|
@ -98,7 +98,7 @@ class Event(models.Model):
|
||||||
#annotations of type event always need an event
|
#annotations of type event always need an event
|
||||||
if a.get_layer().get('type') == 'event' and a.events.count() == 0:
|
if a.get_layer().get('type') == 'event' and a.events.count() == 0:
|
||||||
a.events.add(Event.get_or_create(a.value))
|
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()
|
e.update_matches()
|
||||||
for a in matches.exclude(id__in=self.annotations.all()):
|
for a in matches.exclude(id__in=self.annotations.all()):
|
||||||
#need to check again since editEvent might have been called again
|
#need to check again since editEvent might have been called again
|
||||||
|
|
|
@ -110,7 +110,7 @@ class Place(models.Model):
|
||||||
#annotations of type place always need a place
|
#annotations of type place always need a place
|
||||||
if a.get_layer().get('type') == 'place' and a.places.count() == 0:
|
if a.get_layer().get('type') == 'place' and a.places.count() == 0:
|
||||||
a.places.add(Place.get_or_create(a.value))
|
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()
|
p.update_matches()
|
||||||
for a in matches.exclude(id__in=self.annotations.all()):
|
for a in matches.exclude(id__in=self.annotations.all()):
|
||||||
#need to check again since editEvent might have been called again
|
#need to check again since editEvent might have been called again
|
||||||
|
|
Loading…
Reference in a new issue