Merge pull request #122 from pydata/sponsor-listing-text-is-none

Make sponsor description default empty string.
This commit is contained in:
Patrick Altman 2016-02-20 17:04:32 -06:00
commit 6bee00dff7

View file

@ -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():