Merge pull request #134 from learnhouse/fix/org-creation-bug

Org creation bug
This commit is contained in:
Badr B 2023-12-22 12:24:44 +01:00 committed by GitHub
commit 2a74e082cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,8 +87,11 @@ async def create_org(
org = Organization.from_orm(org_object) org = Organization.from_orm(org_object)
# RBAC check if isinstance(current_user,AnonymousUser):
await rbac_check(request, org.org_uuid, current_user, "create", db_session) raise HTTPException(
status_code=status.HTTP_409_CONFLICT,
detail="You should be logged in to be able to achieve this action",
)
# Complete the org object # Complete the org object
org.org_uuid = f"org_{uuid4()}" org.org_uuid = f"org_{uuid4()}"