You are using this only in the line below, so you could just remove it and use 'self.user.userprofile'.