Fix duplicated episodes error

This commit is contained in:
Zoe Roux 2023-11-28 01:16:38 +01:00
parent 3e31c51f65
commit 8a925b35dd

View File

@ -132,7 +132,7 @@ namespace Kyoo.Postgresql
/// <inheritdoc /> /// <inheritdoc />
protected override bool IsDuplicateException(Exception ex) protected override bool IsDuplicateException(Exception ex)
{ {
return ex.InnerException is PostgresException { SqlState: PostgresErrorCodes.UniqueViolation }; return ex.InnerException is PostgresException { SqlState: PostgresErrorCodes.UniqueViolation or PostgresErrorCodes.ForeignKeyViolation };
} }
} }
} }