def parse_vote_data(self, vote_data):
        """
        Parse data from parltrack votes db dumps (1 proposal)
        """
        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
        )
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 )
Parse data from parltrack votes db dumps (1 proposal)