only yield actual users

This commit is contained in:
Luke Hatcher 2012-12-20 01:55:14 -05:00
parent ca462422ba
commit 582597b7b8

View file

@ -139,7 +139,8 @@ class Presentation(models.Model):
def speakers(self):
yield self.speaker
for speaker in self.additional_speakers.all():
yield speaker
if speaker.user:
yield speaker
def __unicode__(self):
return "#%s %s (%s)" % (self.number, self.title, self.speaker)