예제 #1
0
파일: user.py 프로젝트: CaliOpen/Caliopen
def no_such_user(request):
    """Validator that an user does not exist."""
    username = request.swagger_data['user']['username']
    if not User.is_username_available(username):
        raise NotAcceptable(detail='User already exist')
예제 #2
0
파일: user.py 프로젝트: kadmelia/Caliopen
def no_such_user(request):
    """Validator that an user does not exist."""
    username = request.swagger_data['user']['username']
    if not User.is_username_available(username):
        raise NotAcceptable(detail='User already exist')
예제 #3
0
def no_such_user(request):
    """Validator that an user does not exist."""
    username = request.swagger_data['user']['username']
    if not User.is_username_available(username):
        raise AuthenticationError('User already exist')