Skip to content

fix: nullable Panel return type and avoid duplicate id on translation clone#43

Open
JeanGaelUmanIt wants to merge 1 commit into
mainfrom
fix/updateForSF7
Open

fix: nullable Panel return type and avoid duplicate id on translation clone#43
JeanGaelUmanIt wants to merge 1 commit into
mainfrom
fix/updateForSF7

Conversation

@JeanGaelUmanIt

Copy link
Copy Markdown
Contributor
  • BlockTrait::getPanel() is typed to return ?PanelInterface since it can be null.
  • PanelHandler now instantiates a new Panel() instead of clone $source when creating a translation, since cloning copied the source's id and caused a duplicate primary key violation on insert.

… clone

getPanel() can return null, and cloning the source entity in PanelHandler
copied its id, causing a duplicate primary key violation when Doctrine
persisted the "new" translated entity.
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.

1 participant