case where no entries present

This commit is contained in:
Jesse Bannon 2022-09-10 22:12:18 -07:00
parent bae09013dc
commit f29d256058

View file

@ -18,6 +18,12 @@ class EntryParent(BaseEntry):
def _get_children_entry_variables_to_add( def _get_children_entry_variables_to_add(
self, child_entries: List[TChildEntry] self, child_entries: List[TChildEntry]
) -> Dict[str, str | int]: ) -> Dict[str, str | int]:
"""
Adds source variables to the child entry derived from the parent entry.
"""
if not child_entries:
return {}
return {"playlist_max_upload_year": max(entry.upload_year for entry in child_entries)} return {"playlist_max_upload_year": max(entry.upload_year for entry in child_entries)}
# pylint: enable=no-self-use # pylint: enable=no-self-use