Wishlist error #152

Closed
opened 2026-04-17 09:44:43 +02:00 by derwohat · 9 comments

Hi,

After update to 1.4 I get the "Error: FOREIGN KEY constraint failed." if I try to remove a set from the wishlist.

Other than that: congrats to that nice little update!

Greetings
Dennis

Hi, After update to 1.4 I get the "Error: FOREIGN KEY constraint failed." if I try to remove a set from the wishlist. Other than that: congrats to that nice little update! Greetings Dennis
Owner

I cannot reproduce this. Can you try and run the 'Check Data Integrity' under Admin -> Database -> Maintenance?

I cannot reproduce this. Can you try and run the 'Check Data Integrity' under Admin -> Database -> Maintenance?
FrederikBaerentsen added the Kind/Bug label 2026-04-17 09:54:45 +02:00
FrederikBaerentsen added reference release/1.4 2026-04-17 09:54:50 +02:00
Author

I already did the check yesterday and again today: No integrity issues found! Your database is healthy.

The set I tried to remove is: 75409-1

I already did the check yesterday and again today: No integrity issues found! Your database is healthy. The set I tried to remove is: 75409-1
Owner

Would it be possible for you to send me a copy of your database?

Would it be possible for you to send me a copy of your database?
Author

Yes. Its 17 MB. Where can I send it to?

Yes. Its 17 MB. Where can I send it to?
Owner

If you cant attach it here (forgot what the max upload size is), can you upload it to https://seafile.baerentsen.space/u/d/4b3970edd649433fb12d/

If you cant attach it here (forgot what the max upload size is), can you upload it to https://seafile.baerentsen.space/u/d/4b3970edd649433fb12d/
Author

Done

Done
Owner

Thanks for sharing your database, that made it easy to track down the issue. The bug was in the order things got deleted. Wish owners were being removed after the wish itself, but the database requires it to go the other way around. Delete the owner first, then the wish. Since you had an owner assigned to that wish, the FK error occurred. I have no owners in my test data so I never saw it. The fix is done and will be part of 1.4.1. If you want to try it now, pull the :dev Docker image tag and it should be good.

Fixed in 69318e7b0b.

Thanks for sharing your database, that made it easy to track down the issue. The bug was in the order things got deleted. Wish owners were being removed after the wish itself, but the database requires it to go the other way around. Delete the owner first, then the wish. Since you had an owner assigned to that wish, the FK error occurred. I have no owners in my test data so I never saw it. The fix is done and will be part of `1.4.1`. If you want to try it now, pull the `:dev` Docker image tag and it should be good. Fixed in [69318e7b0b](https://gitea.baerentsen.space/FrederikBaerentsen/BrickTracker/commit/69318e7b0b157a969a87e5a498a40a4fb7e08654).
Author

Ok, now I deselected the wish owner, but I still cant remove the wish.

Ok, now I deselected the wish owner, but I still cant remove the wish.
Owner

Did you switch and pull the :dev branch?

The issue with just removing the owner is that the set still is in the table bricktracker_wish_owners, it just shows 0.

Did you switch and pull the `:dev` branch? The issue with just removing the owner is that the set still is in the table `bricktracker_wish_owners`, it just shows `0`.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: FrederikBaerentsen/BrickTracker#152