Permalink
Browse files

Updated choice field string split to remove '' from resulting list of…

… choices.
  • Loading branch information...
Amalia Gherasim
Amalia Gherasim committed Apr 12, 2012
1 parent a0cb375 commit 17f13cdc3fcdb06b967dc2203914e79f93fcac61
Showing with 2 additions and 1 deletion.
  1. +2 −1 smartsnippets/models.py
View
@@ -96,7 +96,8 @@ class DropDownVariable(SmartSnippetVariable):
@property
def choices_list(self):
- return [choice.strip() for choice in self.choices.split(',')]
+ return ([choice.strip() for choice in self.choices.split(',') if choice.strip()]
+ if self.choices else [])
def save(self, *args, **kwargs):
self.widget = 'DropDownField'

0 comments on commit 17f13cd

Please sign in to comment.