[BUGFIX] Fix truncated year source variable (#185)

This commit is contained in:
Jesse Bannon 2022-08-18 17:57:27 -07:00 committed by GitHub
parent 2a666ef70b
commit c443d2e295
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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:

View file

@ -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,