def update_dois(self):
dois = record_get_field_instances(self.record, '<STR_LIT>', ind1="<STR_LIT>")<EOL>all_dois = {}<EOL>for field in dois:<EOL><INDENT>subs = field_get_subfield_instances(field)<EOL>subs_dict = dict(subs)<EOL>if subs_dict.get('<STR_LIT:a>'):<EOL><INDENT>if subs_dict['<STR_LIT:a>'] in all_dois:<EOL><INDENT>record_delete_field(self.record, tag='<STR_LIT>', ind1='<STR_LIT>', field_position_global=field[<NUM_LIT:4>])<EOL>continue<EOL><DEDENT>all_dois[subs_dict['<STR_LIT:a>']] = field<EOL><DEDENT><DEDENT>
Remove duplicate BibMatch DOIs.