Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dbalintx committed Jan 19, 2024
1 parent e6f7da6 commit ce47396
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions backend/dataall/core/organizations/api/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -75,7 +76,7 @@ def list_organization_groups(
):
if filter is None:
filter = {}

return OrganizationService.list_organization_groups(
filter=filter,
uri=organizationUri
Expand All @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -164,7 +164,7 @@ def archive_organization(uri):
)

return True

@staticmethod
@has_tenant_permission(permissions.MANAGE_ORGANIZATIONS)
@has_resource_permission(permissions.INVITE_ORGANIZATION_GROUP)
Expand Down Expand Up @@ -245,7 +245,7 @@ def list_organization_groups(filter, uri):
uri=uri,
data=filter,
)

@staticmethod
def resolve_organization_by_env(uri):
context = get_context()
Expand Down

0 comments on commit ce47396

Please sign in to comment.