Skip to content

Fix saving new problems with statements #2650

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

Merged

Conversation

nickygerritsen
Copy link
Member

Fixes #2646.

We used to persist the entity both before and after calling the lifecycle callbacks ourselves, which would introduce weird behavior where Doctrine wanted to insert some rows twice. By not persisting before calling the callbacks ourselves, this issue goes away.

Fixes DOMjudge#2646.

We used to persist the entity both before and after calling the lifecycle callbacks ourselves, which would introduce weird behavior where Doctrine wanted to insert some rows twice.
By not persisting before calling the callbacks ourselves, this issue goes away.
@nickygerritsen nickygerritsen force-pushed the fix-problem-pdf-on-create branch from 010491a to 7b46bd8 Compare August 16, 2024 05:52
Copy link
Member

@vmcj vmcj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have tests for this specific usecase? So creating vs updating of an entity?

CI is green so fine by me.

@nickygerritsen
Copy link
Member Author

We don't have any tests to create problems through the web interface (the only place the problem happened) yet, I think.

@nickygerritsen nickygerritsen added this pull request to the merge queue Aug 16, 2024
Merged via the queue into DOMjudge:main with commit 9f12b77 Aug 16, 2024
23 checks passed
@nickygerritsen nickygerritsen deleted the fix-problem-pdf-on-create branch August 16, 2024 09:10
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

Successfully merging this pull request may close these issues.

Problem with statement cannot be created in the Jury web interface
2 participants