authentication/admin_authentication.py
def forest_enabled(func):
    """
    Decorator for validating that Forest is enabled for this study.
    """
    @functools.wraps(func)
    def wrapped(*args, **kwargs):
        try:
            study = Study.objects.get(id=kwargs.get("study_id", None))
        except Study.DoesNotExist:
            return abort(404)

        if not study.forest_enabled:
            return abort(404)

        return func(*args, **kwargs)

    return wrapped

    Decorator for validating that Forest is enabled for this study.
    
Decorator for validating that Forest is enabled for this study.
Decorator for validating that Forest is enabled for this study .
def forest_enabled(func):
    @functools.wraps(func)
    def wrapped(*args, **kwargs):
        try:
            study = Study.objects.get(id=kwargs.get("study_id", None))
        except Study.DoesNotExist:
            return abort(404)
        if not study.forest_enabled:
            return abort(404)
        return func(*args, **kwargs)
    return wrapped
def forest_enabled ( func ) : @ functools . wraps ( func ) def wrapped ( * args , ** kwargs ) : try : study = Study . objects . get ( id = kwargs . get ( "study_id" , None ) ) except Study . DoesNotExist : return abort ( 404 ) if not study . forest_enabled : return abort ( 404 ) return func ( * args , ** kwargs ) return wrapped
Decorator for validating that Forest is enabled for this study.
Decorator for validating that Forest is enabled for this study .
"""
    Decorator for validating that Forest is enabled for this study.
    """
func