Return user by username if find in database otherwise None

def find_by_username(self, username):
        """Return user by username if find in database otherwise None"""
        data = (db.select(self.table).select('username', 'email', 'real_name',
                                             'password', 'bio', 'status', 'role', 'uid').
                condition('username', username).execute()
                )
        if data:
            return self.load(data[0], self.model)