[BUGFIX] Use epoch_date if upload_date is missing
This commit is contained in:
parent
7c217db843
commit
2a08540a84
1 changed files with 3 additions and 1 deletions
|
|
@ -394,7 +394,9 @@ class UploadDateVariableDefinitions(ABC):
|
||||||
:description:
|
:description:
|
||||||
The entry’s uploaded date, in YYYYMMDD format. If not present, return today’s date.
|
The entry’s uploaded date, in YYYYMMDD format. If not present, return today’s 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
|
@cached_property
|
||||||
def upload_year(self: "VariableDefinitions") -> IntegerVariable:
|
def upload_year(self: "VariableDefinitions") -> IntegerVariable:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue