From 28290ee4cfa72978a525a80ac3ac0bb52fa67012 Mon Sep 17 00:00:00 2001 From: Chance Zibolski Date: Wed, 7 Aug 2013 13:39:21 -0700 Subject: [PATCH] Fix repr in ClusterUser. Now Profiles and Organizations repr's are consistent with their real_type being printed, rather than the ClusterUser type. refs #14367 --- ganeti_web/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ganeti_web/models.py b/ganeti_web/models.py index 17a428df..5fe485a1 100644 --- a/ganeti_web/models.py +++ b/ganeti_web/models.py @@ -1688,6 +1688,9 @@ class ClusterUser(models.Model): real_type = models.ForeignKey(ContentType, related_name="+", editable=False, null=True, blank=True) + def __repr__(self): + return "<%s: %s>" % (str(self.real_type), self.name) + def __unicode__(self): return self.name -- 2.11.4.GIT