mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Use SupportedDialect enum in recorder (#80319)
This commit is contained in:
parent
d75e449c52
commit
b42e26fbdd
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user