...
File ".venv/lib/python3.9/site-packages/django/db/backends/mysql/base.py", line 247, in get_new_connection
connection = Database.connect(**conn_params)
File ".venv/lib/python3.9/site-packages/MySQLdb/__init__.py", line 123, in Connect
return Connection(*args, **kwargs)
File ".venv/lib/python3.9/site-packages/MySQLdb/connections.py", line 185, in __init__
super().__init__(*args, **kwargs2)
TypeError: an integer is required (got type str)
Suggested fix:
try:
value = int(value)
except (TypeError, ValueError):
value = value
Version: 1.3.0 and 2.0.0
Example:
Returns:
Expected:
Error:
Suggested fix: