From a487f78f7e17a58c5672b2dcf43363951c6412f1 Mon Sep 17 00:00:00 2001 From: Martey Dodoo Date: Mon, 25 Jan 2016 15:13:26 -0500 Subject: [PATCH] Make sponsor description default empty string. Set sponsor listing text to an empty string instead of None. If a sponsor doesn't have a benefit named "Sponsor Description", this will prevent the text "None" from displaying in the Django template. --- symposion/sponsorship/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symposion/sponsorship/models.py b/symposion/sponsorship/models.py index f21deb17..f28bc57e 100644 --- a/symposion/sponsorship/models.py +++ b/symposion/sponsorship/models.py @@ -136,7 +136,7 @@ class Sponsor(models.Model): @property def listing_text(self): if not hasattr(self, "_listing_text"): - self._listing_text = None + self._listing_text = "" # @@@ better than hard-coding a pk but still not good benefits = self.sponsor_benefits.filter(benefit__name="Sponsor Description") if benefits.count():