def get_object(self):
if self._object:<EOL><INDENT>return self._object<EOL><DEDENT>self._object = super().get_object()<EOL>if not self.AUDITOR_EVENT_TYPES:<EOL><INDENT>return self._object<EOL><DEDENT>method = self.request.method<EOL>event_type = self.AUDITOR_EVENT_TYPES.get(method)<EOL>if method == '<STR_LIT:GET>' and event_type and is_user(self.request.user):<EOL><INDENT>auditor.record(event_type=event_type,<EOL>instance=self._object,<EOL>actor_id=self.request.user.id,<EOL>actor_name=self.request.user.username)<EOL><DEDENT>elif method == '<STR_LIT>' and event_type and is_user(self.request.user):<EOL><INDENT>auditor.record(event_type=event_type,<EOL>instance=self._object,<EOL>actor_id=self.request.user.id,<EOL>actor_name=self.request.user.username)<EOL><DEDENT>return self._object<EOL>
We memoize the access to this function in case a second call is made.