def accept_record(self, record):
with db.session.begin_nested():<EOL><INDENT>req = InclusionRequest.get(self.id, record.id)<EOL>if req is None:<EOL><INDENT>raise InclusionRequestMissingError(community=self,<EOL>record=record)<EOL><DEDENT>req.delete()<EOL>self.add_record(record)<EOL>self.last_record_accepted = datetime.utcnow()<EOL><DEDENT>
Accept a record for inclusion in the community.

        :param record: Record object.