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.
This commit is contained in:
		
							parent
							
								
									4f59d7a9a1
								
							
						
					
					
						commit
						a487f78f7e
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -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(): | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Martey Dodoo
						Martey Dodoo