def add_record(self, record):
key = current_app.config['<STR_LIT>']<EOL>record.setdefault(key, [])<EOL>if self.has_record(record):<EOL><INDENT>current_app.logger.warning(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(uuid=record.id, comm=self.id))<EOL><DEDENT>else:<EOL><INDENT>record[key].append(self.id)<EOL>record[key] = sorted(record[key])<EOL><DEDENT>if current_app.config['<STR_LIT>']:<EOL><INDENT>if not self.oaiset.has_record(record):<EOL><INDENT>self.oaiset.add_record(record)<EOL><DEDENT><DEDENT>
Add a record to the community.

        :param record: Record object.
        :type record: `invenio_records.api.Record`