Skip to content

Conversation

@pantcr7
Copy link

@pantcr7 pantcr7 commented Apr 13, 2025

Changed:
import_start_date = _safe_convert_date(config.IMPORT_START_DATE, "%Y%m%d") to:
import_start_date = _safe_convert_date(str(config.IMPORT_START_DATE), "%Y%m%d")

Reason:
The previous implementation caused a TypeError when IMPORT_START_DATE was an integer. Error traceback:
TypeError: strptime() argument 1 must be str, not int

Wrapping it in str() ensures compatibility with datetime.strptime().

Changed:
import_start_date = _safe_convert_date(config.IMPORT_START_DATE, "%Y%m%d")
to:
import_start_date = _safe_convert_date(str(config.IMPORT_START_DATE), "%Y%m%d")

Reason:
The previous implementation caused a TypeError when `IMPORT_START_DATE` was an integer.
Error traceback:
TypeError: strptime() argument 1 must be str, not int

Wrapping it in `str()` ensures compatibility with `datetime.strptime()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant