Protect against a really weird emit problem.
This commit is contained in:
parent
6d93c4114f
commit
8a8891f63d
1 changed files with 6 additions and 1 deletions
|
|
@ -174,7 +174,12 @@ class Object(models.Model):
|
||||||
contents = self.get_contents()
|
contents = self.get_contents()
|
||||||
|
|
||||||
if exclude:
|
if exclude:
|
||||||
|
try:
|
||||||
contents.remove(exclude)
|
contents.remove(exclude)
|
||||||
|
except ValueError:
|
||||||
|
# Sometimes very weird things happen with locations, fail
|
||||||
|
# silently.
|
||||||
|
pass
|
||||||
|
|
||||||
for obj in contents:
|
for obj in contents:
|
||||||
obj.emit_to(message)
|
obj.emit_to(message)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue