diff --git a/backend/dataall/core/organizations/api/resolvers.py b/backend/dataall/core/organizations/api/resolvers.py index d83084471..46553269a 100644 --- a/backend/dataall/core/organizations/api/resolvers.py +++ b/backend/dataall/core/organizations/api/resolvers.py @@ -3,14 +3,15 @@ from dataall.core.organizations.db import organization_models as models from dataall.core.organizations.services.organization_service import OrganizationService + def create_organization(context: Context, source, input=None): if not input: - raise exceptions.RequiredParameter(input) + raise exceptions.RequiredParameter(input) if not input.get('SamlGroupName'): raise exceptions.RequiredParameter('groupUri') if not input.get('label'): raise exceptions.RequiredParameter('label') - + return OrganizationService.create_organization(data=input) @@ -75,7 +76,7 @@ def list_organization_groups( ): if filter is None: filter = {} - + return OrganizationService.list_organization_groups( filter=filter, uri=organizationUri @@ -88,5 +89,5 @@ def resolve_organization_by_env(context, source, **kwargs): """ if not source: return None - + return OrganizationService.resolve_organization_by_env(uri=source.environmentUri) diff --git a/backend/dataall/core/organizations/services/organization_service.py b/backend/dataall/core/organizations/services/organization_service.py index f98d9016d..715bd0008 100644 --- a/backend/dataall/core/organizations/services/organization_service.py +++ b/backend/dataall/core/organizations/services/organization_service.py @@ -91,7 +91,7 @@ def get_organization(uri): with context.db_engine.scoped_session() as session: return OrganizationRepository.get_organization_by_uri( session=session, uri=uri - ) + ) @staticmethod def list_organizations(filter): @@ -164,7 +164,7 @@ def archive_organization(uri): ) return True - + @staticmethod @has_tenant_permission(permissions.MANAGE_ORGANIZATIONS) @has_resource_permission(permissions.INVITE_ORGANIZATION_GROUP) @@ -245,7 +245,7 @@ def list_organization_groups(filter, uri): uri=uri, data=filter, ) - + @staticmethod def resolve_organization_by_env(uri): context = get_context()