def find_by_username(username): user = UserData.find_by_username(username) return Usuario(user["username"], user["email"], user["_id"]) if user else None
def find_by_username(self, username): userdata = UserData() return userdata.find_by_username(username)