[BUGFIX] Fix truncated year source variable (#185)
This commit is contained in:
parent
2a666ef70b
commit
c443d2e295
2 changed files with 2 additions and 2 deletions
|
|
@ -140,7 +140,7 @@ class EntryVariables(SourceVariables):
|
|||
int
|
||||
The last two digits of the upload year, i.e. 22 in 2022
|
||||
"""
|
||||
return int(self.upload_date[:2])
|
||||
return int(str(self.upload_year)[-2:])
|
||||
|
||||
@property
|
||||
def upload_month_padded(self) -> str:
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ def mock_entry_to_dict(
|
|||
"upload_date": upload_date,
|
||||
"upload_date_standardized": f"{upload_year}-{_pad(upload_month)}-{_pad(upload_day)}",
|
||||
"upload_year": upload_year,
|
||||
"upload_year_truncated": int(str(upload_year)[:2]),
|
||||
"upload_year_truncated": 21,
|
||||
"upload_month": upload_month,
|
||||
"upload_month_padded": _pad(upload_month),
|
||||
"upload_day": upload_day,
|
||||
|
|
|
|||
Loading…
Reference in a new issue