[BUGFIX] Use epoch_date if upload_date is missing

This commit is contained in:
Jesse Bannon 2024-02-17 07:53:06 -08:00
parent 7c217db843
commit 2a08540a84

View file

@ -394,7 +394,9 @@ class UploadDateVariableDefinitions(ABC):
:description:
The entrys uploaded date, in YYYYMMDD format. If not present, return todays date.
"""
return StringDateMetadataVariable.from_entry(metadata_key="upload_date").as_date_variable()
return StringDateMetadataVariable.from_entry(
metadata_key="upload_date", default=self.epoch_date
).as_date_variable()
@cached_property
def upload_year(self: "VariableDefinitions") -> IntegerVariable: