fix: allow local development admin password

This commit is contained in:
gti
2026-09-22 16:31:33 -03:00
parent 6bdac245b9
commit 35642959c0
3 changed files with 11 additions and 3 deletions
+2 -2
View File
@@ -37,8 +37,8 @@ def verify_password(password: str, stored: str) -> bool:
def create_admin(session, username: str, password: str):
username = username.strip().lower()
if len(username) < 3 or len(password) < 12:
raise ValueError("username must have 3 characters and password 12 characters")
if len(username) < 3:
raise ValueError("username must have 3 characters")
if session.scalar(select(AdminUser).where(AdminUser.username == username)):
raise ValueError("username already exists")
admin = AdminUser(username=username, password_hash=hash_password(password))