diff --git a/gcloud/apigw/decorators.py b/gcloud/apigw/decorators.py index 65262774db..b5ac3e6ed8 100644 --- a/gcloud/apigw/decorators.py +++ b/gcloud/apigw/decorators.py @@ -27,7 +27,7 @@ from gcloud.tasktmpl3.models import TaskTemplate from gcloud.conf import settings -if not sys.argv[1:2] == ['test'] and settings.RUN_VER == 'clouds': +if not sys.argv[1:2] == ['test'] and settings.RUN_VER != 'open': try: from bkoauth.decorators import apigw_required except ImportError: diff --git a/gcloud/apigw/views.py b/gcloud/apigw/views.py index 387b767af6..18b6d7efc4 100644 --- a/gcloud/apigw/views.py +++ b/gcloud/apigw/views.py @@ -35,7 +35,7 @@ from gcloud.tasktmpl3.models import TaskTemplate from gcloud.commons.template.models import CommonTemplate -if not sys.argv[1:2] == ['test'] and settings.RUN_VER == 'clouds': +if not sys.argv[1:2] == ['test'] and settings.RUN_VER != 'open': try: from bkoauth.decorators import apigw_required except ImportError: