diff --git a/transmogrifier/sources/xml/ead.py b/transmogrifier/sources/xml/ead.py index 321f037..a83e03d 100644 --- a/transmogrifier/sources/xml/ead.py +++ b/transmogrifier/sources/xml/ead.py @@ -291,8 +291,7 @@ def get_citation(cls, source_record: Tag) -> str | None: @classmethod def get_content_type(cls, source_record: Tag) -> list[str] | None: content_types = ["Archival materials"] - control_access_elements = cls._get_control_access(source_record) - for control_access_element in control_access_elements: + for control_access_element in cls._get_control_access(source_record): _content_types = [ content_type for content_type_element in control_access_element.find_all("genreform") @@ -371,10 +370,11 @@ def _get_contributor_identifier_url(cls, name_element: Tag) -> list | None: @classmethod def get_dates(cls, source_record: Tag) -> list[timdex.Date] | None: dates = [] - collection_description_did = cls._get_collection_description_did(source_record) source_record_id = cls.get_source_record_id(source_record) dates.extend( - cls._parse_date_elements(collection_description_did, source_record_id) + cls._parse_date_elements( + cls._get_collection_description_did(source_record), source_record_id + ) ) return dates or None @@ -475,8 +475,7 @@ def get_languages(cls, source_record: Tag) -> list[str] | None: @classmethod def get_locations(cls, source_record: Tag) -> list[timdex.Location] | None: locations = [] - control_access_elements = cls._get_control_access(source_record) - for control_access_element in control_access_elements: + for control_access_element in cls._get_control_access(source_record): locations.extend( [ timdex.Location(value=location)