Skip to content

Commit

Permalink
support legacy_org_id on org creation
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmauer committed May 8, 2024
1 parent 2948641 commit e6b891e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions propelauth_py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ def create_org(
members_must_have_matching_domain=False,
domain=None,
max_users=None,
legacy_org_id=None,
):
return _create_org(
auth_url,
Expand All @@ -384,6 +385,7 @@ def create_org(
members_must_have_matching_domain,
domain,
max_users,
legacy_org_id,
)

def update_org_metadata(
Expand Down
3 changes: 3 additions & 0 deletions propelauth_py/api/org.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def _create_org(
members_must_have_matching_domain=False,
domain=None,
max_users=None,
legacy_org_id=None,
):
url = auth_url + f"{ENDPOINT_PATH}/"
json = {
Expand All @@ -85,6 +86,8 @@ def _create_org(
json["domain"] = domain
if max_users is not None:
json["max_users"] = max_users
if legacy_org_id:
json["legacy_org_id"] = legacy_org_id

response = requests.post(url, json=json, auth=_ApiKeyAuth(integration_api_key))
if response.status_code == 401:
Expand Down

0 comments on commit e6b891e

Please sign in to comment.