500 Internal Server error on trying to close duplicate pull request

Issue #517 resolved
Adam Dawidziuk created an issue

Steps to reproduce:

  1. Create a pull request from repo A to B on changeset X
  2. Accept and close review for this pull request
  3. Create yet another pull request from repo A to B on changeset X (same as before)
  4. Accept and close review for this new pull request -> Internal Server Error 500

Version: beta (changeset 2781) Logs in attachment.

Comments (4)

  1. Marcin Kuzminski repo owner
    • edited description
    • removed version

    Hmm ok it's an integrity error, just wondering if this should be even allowed

  2. Marcin Kuzminski repo owner

    Attached traceback for reference:

    IntegrityError: (IntegrityError) duplicate key value violates unique constraint "changeset_statuses_repo_id_key" 'INSERT INTO changeset_statuses (repo_id, user_id, revision, status, changeset_comment_id, modified_at, version, pull_request_id) VALUES (%(repo_id)s, %(user_id)s, %(revision)s, %(status)s, %(changeset_comment_id)s, %(modified_at)s, %(version)s, %(pull_request_id)s) RETURNING changeset_statuses.changeset_status_id' {'status': u'approved', 'pull_request_id': 17, 'repo_id': 90, 'user_id': 3, 'modified_at': datetime.datetime(2012, 8, 1, 3, 23, 23, 234434), 'version': 0, 'changeset_comment_id': None, 'revision': u'b09d43f798414bcbdf4dc1fc5dafe6ce4aa5afc3'}
  3. Log in to comment