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

duplicate key value violates unique constraint "livesettings_longsetting_site_id_group_key_3a0d4ba1_uniq" #88

Open
sebastian-philipp opened this issue Jun 27, 2019 · 3 comments

Comments

@sebastian-philipp
Copy link

<p class="notification">duplicate key value violates unique constraint "livesettings_longsetting_site_id_group_key_3a0d4ba1_uniq"
--
  | DETAIL:  Key (site_id, "group", key)=(1, WORDS, WORDS_QUESTIONS_COUNTABLE_FORMS) already exists.
  | </p> <p class="notification">duplicate key value violates unique constraint "livesettings_longsetting_site_id_group_key_3a0d4ba1_uniq"
  | DETAIL:  Key (site_id, "group", key)=(1, WORDS, WORDS_ANSWERS_COUNTABLE_FORMS) already exists.
  | </p>
@sebastian-philipp sebastian-philipp changed the title uplicate key value violates unique constraint "livesettings_longsetting_site_id_group_key_3a0d4ba1_uniq" duplicate key value violates unique constraint "livesettings_longsetting_site_id_group_key_3a0d4ba1_uniq" Jul 8, 2019
@sebastian-philipp
Copy link
Author

this pops up after saving the livesettings on a fresh database

@martin-bts
Copy link
Owner

martin-bts commented Feb 20, 2020

I just experienced this myself for the first time. I created a couple of Askbot deployments and never had this issue before. Therefore, I think this has something to do with which values were changed, because that's the most notable thing I did differently this time.

I changed values w.r.t. the authentication procedure and, judging from your efforts in making LDAP authentication work, you did too.

@martin-bts
Copy link
Owner

Here is more output from a running Askbot as the error occurs:

ERROR 2020-02-20 04:51:28,097 views 237 140645802810216 failed to save setting WORDS__WORDS_QUESTIONS_COUNTABLE_FORMS:=question
  | questions
  | Traceback (most recent call last):
  | File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
  | return self.cursor.execute(sql, params)
  | psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "livesettings_longsetting_site_id_group_key_3a0d4ba1_uniq"
  | DETAIL: Key (site_id, "group", key)=(1, WORDS, WORDS_QUESTIONS_COUNTABLE_FORMS) already exists.

and

django.db.utils.IntegrityError: duplicate key value violates unique constraint "livesettings_longsetting_site_id_group_key_3a0d4ba1_uniq"
  | DETAIL: Key (site_id, "group", key)=(1, WORDS, WORDS_QUESTIONS_COUNTABLE_FORMS) already exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants