The proposal currently being voted on.

        Returns
        -------
        :class:`ApiQuery` of :class:`ResolutionAtVote`
        :class:`ApiQuery` of None
            If no resolution is currently at vote.
777496
async def resolution_at_vote(self, root):
        
        elem = root.find('RESOLUTION')
        if elem:
            resolution = ResolutionAtVote(elem)
            resolution._council_id = self._council_id
            return resolution
538248
def get_override_votes(self, obj):
        
        if hasattr(obj, "meta"):  # TODO: REVISIT THIS
            if obj.meta.override_ap_votes:
                all_votes = None
                for ce in obj.candidate_elections.all():
                    if all_votes:
                        all_votes = all_votes | ce.votes.all()
                    else:
                        all_votes = ce.votes.all()
                return VotesSerializer(all_votes, many=True).data
        return False
741762
def legislator_vote_value(self):
        '''
        '''
        if not hasattr(self, 'legislator'):
            msg = ('legislator_vote_value can only be called '
                   'from a vote accessed by legislator.votes_manager.')
            raise ValueError(msg)
        leg_id = self.legislator.id
        for k in ('yes', 'no', 'other'):
            for leg in self[k + '_votes']:
                if leg['leg_id'] == leg_id:
                    return k
851088
def available_delegations(self):
        
        api_version = self._get_api_version('available_delegations')
        if api_version == '2018-08-01':
            from .v2018_08_01.operations import AvailableDelegationsOperations as OperationClass
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))
        return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
1038636
def choose(self, choose_from):
        

        for choice in self.elements:
            if choice in choose_from:
                return ImplementationChoice(choice, choose_from[choice])
        raise LookupError(self.elements, choose_from.keys())
1325008
def upvote(self):
        
        self.requester.post(
            '/{endpoint}/{id}/upvote',
            endpoint=self.endpoint, id=self.id
        )
        return self
208325
def vote(cls):
        """"""
        url = configuration.VoteUrl + 'count/'
        uid = get_system_uid()
        data = {"name": cls.getName().replace('/', '_'), "uid": uid}
        page = urlopen(url, cls.session, data=data)
        return page.text
518828
def defRPr(self):
        
        p = self.p_lst[0]
        pPr = p.get_or_add_pPr()
        defRPr = pPr.get_or_add_defRPr()
        return defRPr
443032
def _create_vote_txn(signer, proposal_id, setting_key, vote_value):
    
    if vote_value == 'accept':
        vote_id = SettingVote.ACCEPT
    else:
        vote_id = SettingVote.REJECT

    vote = SettingVote(proposal_id=proposal_id, vote=vote_id)
    payload = SettingsPayload(data=vote.SerializeToString(),
                              action=SettingsPayload.VOTE)

    return _make_txn(signer, setting_key, payload)
1327794
def best_result(self):
        
        best_result = None
        for result in self.results:
            if best_result is None or result.figure_of_merit > best_result.figure_of_merit:
                best_result = result
        return best_result
148437
def parse_vote_data(self, vote_data):
        
        if 'epref' not in vote_data.keys():
            logger.debug('Could not import data without epref %s',
                vote_data['title'])
            return

        dossier_pk = self.get_dossier(vote_data['epref'])

        if not dossier_pk:
            logger.debug('Cannot find dossier with remote id %s',
                         vote_data['epref'])
            return

        return self.parse_proposal_data(
            proposal_data=vote_data,
            dossier_pk=dossier_pk
        )
163282
def to_protobuf(self) -> str:
        ''''''

        vote = pavoteproto.Vote()
        vote.version = self.version
        vote.description = self.description
        vote.count_mode = vote.MODE.Value(self.count_mode)
        vote.start_block = self.start_block
        vote.end_block = self.end_block
        vote.choices.extend(self.choices)

        if not isinstance(self.vote_metainfo, bytes):
            vote.vote_metainfo = self.vote_metainfo.encode()
        else:
            vote.vote_metainfo = self.vote_metainfo

        proto = vote.SerializeToString()

        if len(proto) > 80:
            warnings.warn('\nMetainfo size exceeds maximum of 80 bytes allowed by OP_RETURN.')

        return proto
533507
def vote(self, identifier, weight=100.0):
        ''' 
        '''
        for num_of_retries in range(default.max_retry):
            try:
                self.steem_instance().vote(identifier, 
                    weight, self.mainaccount)
                self.msg.message("voted for " + identifier)
                time.sleep(5)
            except Exception as e:
                if re.search(r'You have already voted in a similar way', str(e)):
                    self.msg.error_message('''Already voted on 
                                        {}'''.format(identifier))
                    return "already voted"
                else:
                    self.util.retry('''COULD NOT VOTE ON 
                                    {}'''.format(identifier), 
                                    e, num_of_retries, default.wait_time)
                    self.s = None
            else:
                return True
723778
def votes(self, req) -> int:
        
        try:
            votes = len(self[req.key].propagates)
        except KeyError:
            votes = 0
        return votes
772785
def up_vote(votable)
      is_votable?(votable)
      
      vote = get_vote(votable)
      
      if vote
        if vote.up_vote
          raise Exceptions::AlreadyVotedError.new(true)
        else
          vote.up_vote = true
          votable.down_votes -= 1
          self.down_votes -= 1 if has_attribute?(:down_votes)
        end
      else
        vote = Vote.create(:votable => votable, :voter => self, :up_vote => true)
      end
      
      votable.up_votes += 1
      self.up_votes += 1 if has_attribute?(:up_votes)  
      
      Vote.transaction do
        save
        votable.save
        vote.save
      end
      
      true
    end
1078339
def _get_candidates(self):
        
        candidates = np.where(self.dpp_vector == 0)
        return None if len(candidates[0]) == 0 else candidates[0]
1242982
def selected(self):
        
        query_results = self.map(lambda el: el.is_selected(), 'selected').results
        if query_results:
            return all(query_results)
        return False