fix: UserRole enum case mismatch with PostgreSQL (OWNER→owner)

This commit is contained in:
enzo
2026-07-22 18:06:17 +08:00
parent eaf13e5f51
commit ff813824fa
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -77,10 +77,10 @@ async def create_user(db: AsyncSession, username: str, email: str, password: str
existing_count = len(result.scalars().all())
if existing_count == 0:
role = UserRole.OWNER
role = UserRole.owner
is_approved = True
else:
role = UserRole.VIEWER
role = UserRole.viewer
is_approved = False
user = User(