(self, request, user_docs_by_id, usernames)
return usernames_not_found
The only side effect of this is to possibly add to request.messages.
The only side effect of this is to possibly add to request.messages.
The only side effect of this is to possibly add to request . messages .
def _get_usernames_not_found(self, request, user_docs_by_id, usernames):
        """
            The only side effect of this is to possibly add to request.messages.
        """
        usernames_not_found = set(usernames) - {doc['username'] for doc in user_docs_by_id.values()}
        if usernames_not_found:
            message = _("The following users were not found: {}.").format(
                ", ".join(map(raw_username, usernames_not_found)))
            messages.error(request, message)
        return usernames_not_found
def _get_usernames_not_found ( self , request , user_docs_by_id , usernames ) : usernames_not_found = set ( usernames ) - { doc [ 'username' ] for doc in user_docs_by_id . values ( ) } if usernames_not_found : message = _ ( "The following users were not found: {}." ) . format ( ", " . join ( map ( raw_username , usernames_not_found ) ) ) messages . error ( request , message ) return usernames_not_found