(self)
return chosen
Convert multi choice field selections to a flat array
        of { id, type } dicts.
Convert multi choice field selections to a flat array
        of { id, type } dicts.
Convert multi choice field selections to a flat array of { id type } dicts .
def get_chosen_relations(self):
        """
        Convert multi choice field selections to a flat array
        of { id, type } dicts.
        """
        data = self.cleaned_data
        chosen = []
        for _type in get_supported_types():
            for item in data.get(_type, []):
              chosen.append({'_id' : item, '_type' : _type})
        return chosen
def get_chosen_relations ( self ) : data = self . cleaned_data chosen = [ ] for _type in get_supported_types ( ) : for item in data . get ( _type , [ ] ) : chosen . append ( { '_id' : item , '_type' : _type } ) return chosen