Adm global
This commit is contained in:
@@ -34,7 +34,9 @@ async def create_tenant(
|
||||
if result.scalar_one_or_none():
|
||||
raise HTTPException(status_code=400, detail="Tenant slug already exists")
|
||||
|
||||
db_tenant = Tenant(**tenant.model_dump())
|
||||
data = tenant.model_dump()
|
||||
data['slug'] = data['slug'].lower().strip()
|
||||
db_tenant = Tenant(**data)
|
||||
db.add(db_tenant)
|
||||
await db.commit()
|
||||
await db.refresh(db_tenant)
|
||||
|
||||
Reference in New Issue
Block a user