From 2b044e52e7c1445d245bf314afa0a655742d2471 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 11 May 2013 01:31:24 +0200 Subject: [PATCH] =?utf8?q?Allow=20an=20artist=E2=80=99s=20groups=20to=20be?= =?utf8?q?=20empty.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- data/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/models.py b/data/models.py index 11bdc59..482e987 100644 --- a/data/models.py +++ b/data/models.py @@ -12,10 +12,10 @@ class Group(models.Model): 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) -- 2.7.4