Fix: remove views from projects if catalog is changed #1200
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As described in #1198, if the project's catalog is changed, views that are no longer available are not remove. This PR implements this.
In addition, it sketches the addition of now available views to the project. However, as the user is not available, this is not yet working. If we find a solution, we might similarly, add this if the view is changed in the management interface which currently also implements the removal only.
As the buildin signal post_save does not contain the request object, we may need to move to a custom signal in order to enable filtering based on groups and availability for the user.
ToBeDone:
Related issue: #1198