]> cat aescling's git repositories - mastodon.git/commit
Wrong exception class: ActiveRecord::RecordNotUnique, not PG::UniqueViolation (#7688)
authorEugen Rochko <eugen@zeonfederated.com>
Thu, 31 May 2018 15:22:33 +0000 (17:22 +0200)
committerGitHub <noreply@github.com>
Thu, 31 May 2018 15:22:33 +0000 (17:22 +0200)
commitfb1ae0152d399db863457963890310a500863b02
treefb145d012a6751db61153bf8a7b30482adc26864
parent19b4c666f7f760986be4215ea874f951c617a0df
Wrong exception class: ActiveRecord::RecordNotUnique, not PG::UniqueViolation (#7688)

* Wrong exception class: ActiveRecord::RecordNotUnique, not PG::UniqueViolation

It's completely not obvious but PG::UniqueViolation is just a string inside the exception message, not the actual class of the exception

* Favourite does not have target_account_id
db/migrate/20180528141303_fix_accounts_unique_index.rb