File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/postgres-database/src/simcore_postgres_database Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ class UserNotFoundInRepoError(BaseUserRepoError):
2727
2828
2929# NOTE: see MyProfilePatch.user_name
30- _MIN_USERNAME_LEN : Final [int ] = 4
30+ MIN_USERNAME_LEN : Final [int ] = 4
3131
3232
33- def _generate_random_chars (length : int = _MIN_USERNAME_LEN ) -> str :
33+ def _generate_random_chars (length : int = MIN_USERNAME_LEN ) -> str :
3434 """returns `length` random digit character"""
3535 return "" .join (secrets .choice (string .digits ) for _ in range (length ))
3636
@@ -42,8 +42,8 @@ def _generate_username_from_email(email: str) -> str:
4242 username = re .sub (r"[^a-zA-Z0-9]" , "" , username ).lower ()
4343
4444 # Ensure the username is at least 4 characters long
45- if len (username ) < _MIN_USERNAME_LEN :
46- username += _generate_random_chars (length = _MIN_USERNAME_LEN - len (username ))
45+ if len (username ) < MIN_USERNAME_LEN :
46+ username += _generate_random_chars (length = MIN_USERNAME_LEN - len (username ))
4747
4848 return username
4949
You can’t perform that action at this time.
0 commit comments