Skip to content

Removing user with submissions fails #2207

@vmcj

Description

@vmcj

Description of the problem

We get the following error: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (domjudge.judging_run, CONSTRAINT FK_29A6E6E13CBA64F2 FOREIGN KEY (judgetaskid) REFERENCES judgetask (judgetaskid)) when deleting a user which has submissions.

Your environment

  • main branch
  • BAPC2023 dump

Steps to reproduce

  • Either load the BAPC2023 dump or upload a contest with example problems
  • Make sure everything is judged
  • Remove the user which uploaded the problems via GUI
    • The screen hangs as we fail in the background
  • Remove a team user
    • Same result

Expected behaviour

The user gets deleted, no server errors expected

Actual behaviour

Hanging screen, user is not removed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions