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

Feature 34: Bug: Verdoppelung von Verweisen #85

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

daniel-va
Copy link
Contributor

@daniel-va daniel-va commented Apr 12, 2024

Fix for #34.

Cause: Sibling assets are saved in the database via the asset_x_asset_y table. The table has two ids as its fields, one for each sibling. This means that it is possible for a sibling relationship two appear twice, by switching the values of the two id fields. In theory, the API guards against that by deleting duplicates before inserting new entities, but that check was faulty.

Fix: We now just delete all entities of asset_x_asset_y table that belong to the asset that is being modified, and then immediately insert all correct ones. This ensures that we remove any possible duplicates before even creating them.

Note that this does not remove any existing entities, see my comment in #34.

@daniel-va daniel-va requested a review from ga-ebp April 12, 2024 14:17
@daniel-va daniel-va self-assigned this Apr 12, 2024
@daniel-va daniel-va requested a review from TIL-EBP April 12, 2024 14:18
@daniel-va daniel-va merged commit a4cfdaf into develop Apr 17, 2024
3 checks passed
@daniel-va daniel-va deleted the feature/asset-34-bug-verdoppelung-von-verweisen branch April 17, 2024 14:27
daniel-va added a commit that referenced this pull request Jun 13, 2024
…g-von-verweisen

Feature 34: Bug: Verdoppelung von Verweisen
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.

2 participants