class Artist(models.Model):
name = models.CharField(max_length = 80)
realName = models.CharField(max_length = 80, blank = True)
- groups = models.ManyToManyField(Group)
+ groups = models.ManyToManyField(Group, blank = True)
def __unicode__(self):
- return "%s%s" % (self.name, (" / %s" % (" ^ ".join(g.shortName if (g.shortName != '') else g.name for g in self.groups.all()), )))
+ return "%s%s" % (self.name, (" / %s" % (" ^ ".join(g.shortName if (g.shortName != '') else g.name for g in self.groups.all()), )) if (self.groups.all()) else '')
class Party(models.Model):
name = models.CharField(max_length = 80)