def choicelist(self): #excludes the choice uuid choices = [] if self._type == FLAG_CHOICE: choicelist = FlagChoice.by_flag_id(self.id) if choicelist is not None and len(choicelist) > 0: for flagchoice in choicelist: choices.append(flagchoice.choice) return json.dumps(choices)
def choicelist(self): #excludes the choice uuid choices = [] if self._type == FLAG_CHOICE: choicelist = FlagChoice.by_flag_id(self.id) if choicelist is not None and len(choicelist) > 0: for flagchoice in choicelist: choices.append(flagchoice.choice) return json.dumps(choices)
def choices(self): #inlucdes the choice uuid - needed for editing choice choices = [] if self._type == FLAG_CHOICE: choicelist = FlagChoice.by_flag_id(self.id) if choicelist is not None and len(choicelist) > 0: for flagchoice in choicelist: choices.append(flagchoice.to_dict()) return json.dumps(choices)
def choices(self): #inlucdes the choice uuid - needed for editing choice choices = [] if self._type == FLAG_CHOICE: choicelist = FlagChoice.by_flag_id(self.id) if choicelist is not None and len(choicelist) > 0: for flagchoice in choicelist: choices.append(flagchoice.to_dict()) return json.dumps(choices)