app/soc/views/helper/surveys.py
changeset 2533 941732c52b67
parent 2530 d7a0ab3f1965
child 2539 dd0322a37e44
equal deleted inserted replaced
2532:0b4dbe4b3fb7 2533:941732c52b67
   291 
   291 
   292     these_choices = []
   292     these_choices = []
   293     # add all properties, but select chosen one
   293     # add all properties, but select chosen one
   294     # TODO(ajaksu): this breaks ordering and blocks merging choice methods
   294     # TODO(ajaksu): this breaks ordering and blocks merging choice methods
   295     options = getattr(self.survey_content, field)
   295     options = getattr(self.survey_content, field)
   296     has_record = not self.editing and self.survey_record
   296     if self.survey_record and hasattr(self.survey_record, field):
   297     if has_record and hasattr(self.survey_record, field):
       
   298       these_choices.append((value, value))
   297       these_choices.append((value, value))
   299       if value in options:
   298       if value in options:
   300         options.remove(value)
   299         options.remove(value)
   301 
   300 
   302     for option in options:
   301     for option in options: