File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -218,10 +218,9 @@ def create_correspondent(self, name_string: str) -> list:
218218 authority_file_uri = "https://d-nb.info/gnd/" + str (person_ids [index ].strip ())
219219 else :
220220 authority_file_uri = str (person_ids [index ].strip ())
221- if self .profile_desc .findall (f'correspDesc/correspAction/persName[@ref="{ authority_file_uri } "]' ):
222- correspondent = Element ("persName" )
223- elif self .profile_desc .findall (f'correspDesc/correspAction/orgName[@ref="{ authority_file_uri } "]' ):
224- correspondent = Element ("orgName" )
221+ processed_correspondent = self .profile_desc .find (f'correspDesc/correspAction/*[@ref="{ authority_file_uri } "]' )
222+ if processed_correspondent is not None :
223+ correspondent = Element (processed_correspondent .tag )
225224 else :
226225 if "viaf" in authority_file_uri :
227226 try :
You can’t perform that action at this time.
0 commit comments