Skip to content

Conversation

@sanderPostma
Copy link
Contributor

No description provided.

return result
.filter((party) => {
// Do not crash fetching the entire contacts list over one missing contact relation
if (!party.contact) {
Copy link
Contributor

@BtencateSphereon BtencateSphereon Dec 11, 2025

Choose a reason for hiding this comment

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

with this you are masking the actual problem. A party should always have a contact which is a natural person or organization. So how was a party like this created in the first place?

Copy link
Contributor Author

@sanderPostma sanderPostma Dec 11, 2025

Choose a reason for hiding this comment

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

I have no explanation for that even after a second look. I just found one or more records with this state which caused the contacts overview screen to remain blank. Supabase deletes the Party which should cascade to contact, so that can't be it .

There should have been a DB constraint to protect this, but changing that is nasty now, We'd need to flip the direction of the Foreign Key, also for existing databases.
Since we are moving to IDK/EDK we should not be doing that anymore IMO, so it's either this or drop or repair the database every time this happens.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok but then maybe @nklomp should decide

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.

3 participants