From d5d1d5fa6d06527d0a76bb26b84f58ef338c0a9a Mon Sep 17 00:00:00 2001 From: Athul <89829560+athul-rs@users.noreply.github.com> Date: Fri, 8 Nov 2024 11:14:03 +0530 Subject: [PATCH] Organization subscription improvements (#832) * Organization subscription improvements * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com> --- backend/account_v2/organization.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/backend/account_v2/organization.py b/backend/account_v2/organization.py index 72ef69200..9768c9f36 100644 --- a/backend/account_v2/organization.py +++ b/backend/account_v2/organization.py @@ -2,13 +2,10 @@ from typing import Optional from account_v2.models import Organization -from account_v2.subscription_loader import SubscriptionConfig, load_plugins from django.db import IntegrityError Logger = logging.getLogger(__name__) -subscription_loader = load_plugins() - class OrganizationService: def __init__(self): # type: ignore @@ -32,13 +29,6 @@ def create_organization( organization_id=organization_id, ) organization.save() - - for subscription_plugin in subscription_loader: - cls = subscription_plugin[SubscriptionConfig.METADATA][ - SubscriptionConfig.METADATA_SERVICE_CLASS - ] - cls.add(organization_id=organization_id) - except IntegrityError as error: Logger.info(f"[Duplicate Id] Failed to create Organization Error: {error}") raise error