Use SupportedDialect enum in recorder (#80319)

This commit is contained in:
Erik Montnemery
2022-10-14 14:45:57 +02:00
committed by GitHub
parent d75e449c52
commit b42e26fbdd

View File

@@ -1529,7 +1529,7 @@ def _filter_unique_constraint_integrity_error(
and err.orig.pgcode == "23505" and err.orig.pgcode == "23505"
): ):
ignore = True 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): with contextlib.suppress(TypeError):
if err.orig.args[0] == 1062: if err.orig.args[0] == 1062:
ignore = True ignore = True