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

When a page connected to linkit is dropped the page where linkit was used starts returning a 500 error #9

Open
victor-yunenko opened this issue Jul 24, 2020 · 1 comment

Comments

@victor-yunenko
Copy link

I suppose the reason is that the data is stored using raw IDs instead of foreign keys with on_delete=PROTECT

@sidneywidmer
Copy link
Contributor

Jep, you're right - that's a problem!

I don't want to solve this on the DB layer because I think the value column should be as generic as possible. The current implementation also allows for custom XYTypeForms where we have multiple additional fields and the value of these fields are json encoded in the value field.

Was the 500 related to any custom code by you? Because if you call label or href on a PageType link it should just return false (because the result of the real_value db query is null)

Maybe we can check registered LinkTypes with a django delete signal? Give custom (and existing) LinkTypes an option to tap into signals?

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

No branches or pull requests

2 participants