@property<EOL><INDENT>def enterprise_enrollment_exists(self):<DEDENT>
if self.course_id:<EOL><INDENT>try:<EOL><INDENT>user_id = User.objects.get(username=self.username).pk<EOL><DEDENT>except User.DoesNotExist:<EOL><INDENT>return False<EOL><DEDENT>return EnterpriseCourseEnrollment.objects.filter(<EOL>course_id=self.course_id,<EOL>enterprise_customer_user__user_id=user_id,<EOL>enterprise_customer_user__enterprise_customer=self.enterprise_customer,<EOL>).exists()<EOL><DEDENT>return False<EOL>
Determine whether there exists an EnterpriseCourseEnrollment related to this consent record.