(self, username=None)
return result
Create a list of dictionaries with Identifier information which can be
        used for rendering in a template.

        :returns: list
Create a list of dictionaries with Identifier information which can be
        used for rendering in a template.
Create a list of dictionaries with Identifier information which can be used for rendering in a template .
def generate_identifiers_list(self, username=None):
        """
        Create a list of dictionaries with Identifier information which can be
        used for rendering in a template.

        :returns: list
        """

        result = []
        if not username:
            return result
        sources = user_sources(username)
        for i in self.identifiers:
            it = ActorIdentifier.objects(id=i.identifier_id,
                                         source__name__in=sources).first()
            if it:
                d = {}
                d['analyst'] = i.analyst
                d['confidence'] = i.confidence
                d['id'] = i.identifier_id
                d['type'] = it.identifier_type
                d['name'] = it.name
                d['date'] = i.date
                result.append(d)
        return result
def generate_identifiers_list ( self , username = None ) : result = [ ] if not username : return result sources = user_sources ( username ) for i in self . identifiers : it = ActorIdentifier . objects ( id = i . identifier_id , source__name__in = sources ) . first ( ) if it : d = { } d [ 'analyst' ] = i . analyst d [ 'confidence' ] = i . confidence d [ 'id' ] = i . identifier_id d [ 'type' ] = it . identifier_type d [ 'name' ] = it . name d [ 'date' ] = i . date result . append ( d ) return result