Use SupportedDialect enum in recorder (#80319)

pull/80327/head
Erik Montnemery 2022-10-14 14:45:57 +02:00 committed by GitHub
parent d75e449c52
commit b42e26fbdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1529,7 +1529,7 @@ def _filter_unique_constraint_integrity_error(
and err.orig.pgcode == "23505"
):
ignore = True
if dialect_name == "mysql" and hasattr(err.orig, "args"):
if dialect_name == SupportedDialect.MYSQL and hasattr(err.orig, "args"):
with contextlib.suppress(TypeError):
if err.orig.args[0] == 1062:
ignore = True