Add superadmin routes to API
This commit is contained in:
@@ -302,7 +302,7 @@ class OrganizationService:
|
||||
Raises:
|
||||
ConflictError: If user is already a member
|
||||
"""
|
||||
# Check if already a member (active or soft-deleted — both blocked by DB unique constraint)
|
||||
# Check for any membership (active or soft-deleted) to enable reactivation
|
||||
existing = OrganizationMember.query.filter_by(
|
||||
user_id=user_id,
|
||||
organization_id=org.id,
|
||||
@@ -310,7 +310,7 @@ class OrganizationService:
|
||||
|
||||
# Development-only debug logging for membership validation
|
||||
if current_app.config.get('ENV') == 'development':
|
||||
logger.debug(f"[Org] Member check: org_id={org.id}, user_id={user_id}, already_member={existing is not None}")
|
||||
logger.debug(f"[Org] Member check: org_id={org.id}, user_id={user_id}, already_member={existing is not None}, soft_deleted={existing.deleted_at is not None if existing else False}")
|
||||
|
||||
if existing:
|
||||
if existing.deleted_at is not None:
|
||||
|
||||
Reference in New Issue
Block a user