diff --git a/private/lib/validator.py b/private/lib/validator.py index a5c3be2..e1e58f9 100644 --- a/private/lib/validator.py +++ b/private/lib/validator.py @@ -20,7 +20,7 @@ def checkUsernameLength(username: str): return True -def checkUserExists(username: str, db: str): +def checkUserExists(username: str): try: pwd.getpwnam(username) except KeyError: @@ -98,7 +98,7 @@ def checkImportFile(fname: str, db: str): if not lib.validator.checkEmail(row["email"]): error_list += f"Line {ln}: E-Mail address of user '{row['username']}' '{row['email']}' is not valid.\n" valid = False - if not lib.validator.checkUserExists(row["username"], db) or checkUserInDB(row["username"], db): + if not lib.validator.checkUserExists(row["username"]) or checkUserInDB(row["username"], db): error_list += f"Line {ln}: User '{row['username']}' already exists.\n" valid = False if not lib.validator.checkDatetimeFormat(row["timestamp"]):