mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: lowercase org slug
This commit is contained in:
parent
68cd4973c9
commit
d01550d129
1 changed files with 6 additions and 1 deletions
|
|
@ -62,7 +62,12 @@ async def create_org(
|
||||||
# generate org_id with uuid4
|
# generate org_id with uuid4
|
||||||
org_id = str(f"org_{uuid4()}")
|
org_id = str(f"org_{uuid4()}")
|
||||||
|
|
||||||
org = OrganizationInDB(org_id=org_id, **org_object.dict())
|
# force lowercase slug
|
||||||
|
org_object.slug = org_object.slug.lower()
|
||||||
|
|
||||||
|
org = OrganizationInDB(
|
||||||
|
org_id=org_id, **org_object.dict()
|
||||||
|
)
|
||||||
|
|
||||||
org_in_db = await orgs.insert_one(org.dict())
|
org_in_db = await orgs.insert_one(org.dict())
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue