Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActiveRecord::RecordNotUnique happened in InitiativesController#update #998

Open
appsignal bot opened this issue Aug 29, 2024 · 0 comments
Open

ActiveRecord::RecordNotUnique happened in InitiativesController#update #998

appsignal bot opened this issue Aug 29, 2024 · 0 comments

Comments

@appsignal
Copy link

appsignal bot commented Aug 29, 2024

** DEV NOTE **

Issue caused by duplicated records in the subsystem tags attributes. Just need to remove the duplicates before updating the record.

Message

  PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "idx_initiatives_subsystem_tags_initiative_and_subsystem_tag_id"
DETAIL:  Key (initiative_id, subsystem_tag_id)=(?) already exists.

Backtrace (last 10 lines)

lib/active_record/connection_adapters/postgresql_adapter.rb:768 exec_params
lib/active_record/connection_adapters/postgresql_adapter.rb:768 block (2 levels) in exec_no_cache
lib/active_support/concurrency/share_lock.rb:187 yield_shares
lib/active_support/dependencies/interlock.rb:41 permit_concurrent_loads
lib/active_record/connection_adapters/postgresql_adapter.rb:767 block in exec_no_cache
lib/active_support/concurrency/load_interlock_aware_monitor.rb:25 handle_interrupt
lib/active_support/concurrency/load_interlock_aware_monitor.rb:25 block in synchronize
lib/active_support/concurrency/load_interlock_aware_monitor.rb:21 handle_interrupt
lib/active_support/concurrency/load_interlock_aware_monitor.rb:21 synchronize
lib/active_record/connection_adapters/abstract_adapter.rb:752 block in log

View on AppSignal: https://appsignal.com/eventide-systems-pty-ltd/sites/66cc61b4ecef188d809b49d4/exceptions/incidents/41

@ferrisoxide ferrisoxide moved this from Scheduled to In progress in Tool for Systemic Change Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

No branches or pull requests

0 participants