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

Implemented workaround to unblock an object's edit page form after deleting a custom field #1626

Merged
merged 7 commits into from
Apr 12, 2022

Conversation

briddo
Copy link
Contributor

@briddo briddo commented Apr 10, 2022

Closes: #1582

What's Changed

Any model which inherits from CustomFieldModel will now log a warning instead of raising a ValidationError if there is stale _custom_field_data, therefore unblocking the UI. It was previously raising a ValidationError because the cleanup task hadn't completed. We don't want to the block the UI because the cleanup task (called here) hasn't yet finished.

Copy link
Contributor

@glennmatthews glennmatthews left a comment

Choose a reason for hiding this comment

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

Were you able to confirm that this is purely a timing/worker-not-running issue? Or do we have an underlying bug of the custom field data not being cleaned up ever?

Also see this comment on the original issue:

When fixing this, please make sure changelog is created for any object having a choice of this Selection cf assigned.

Is it feasible for the worker task to create a changelog entry when it cleans up the custom-field data on the device object?

@briddo
Copy link
Contributor Author

briddo commented Apr 12, 2022

Were you able to confirm that this is purely a timing/worker-not-running issue? Or do we have an underlying bug of the custom field data not being cleaned up ever?

Also see this comment on the original issue:

When fixing this, please make sure changelog is created for any object having a choice of this Selection cf assigned.

Is it feasible for the worker task to create a changelog entry when it cleans up the custom-field data on the device object?

Taking too long to implement change logging so opening a new issue for now..

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.

Removing custom field does not clean up choices from objects
3 participants