From 6cd0b65fe8baba7300f1d5f52f81cdb32f9a5294 Mon Sep 17 00:00:00 2001 From: Sanj Date: Tue, 31 Jul 2012 01:04:30 +0530 Subject: [PATCH] silly bug in autocomplete fixed --- itf/app/models.py | 2 +- itf/itfprofiles/models.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/itf/app/models.py b/itf/app/models.py index fad234b..4f0636e 100755 --- a/itf/app/models.py +++ b/itf/app/models.py @@ -72,7 +72,7 @@ class ItfModel(models.Model): d = self.list_dict() d['text'] = self.get_text() if not d['text']: - return '' + d['text'] = '' if len(d['text']) > 150: d['text'] = d['text'][:150] + "..." return d diff --git a/itf/itfprofiles/models.py b/itf/itfprofiles/models.py index 0bbe7d9..d1c7b27 100644 --- a/itf/itfprofiles/models.py +++ b/itf/itfprofiles/models.py @@ -291,6 +291,9 @@ class TheatreGroup(ItfModel): 'about': self.about, } + def get_title(self): + return self.__unicode__() + class PersonGroup(models.Model): person = models.ForeignKey(Person, db_index=True) group = models.ForeignKey(TheatreGroup, db_index=True)