Skip to content

Commit

Permalink
Organization subscription improvements (#832)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
3 people authored Nov 8, 2024
1 parent 65b436f commit d5d1d5f
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions backend/account_v2/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d5d1d5f

Please sign in to comment.