rdmorganiser / rdmo

A tool to support the planning, implementation, and organization of research data management.
https://rdmorganiser.github.io
Apache License 2.0
105 stars 49 forks source link

Fix: remove views from projects if catalog is changed #1200

Open m6121 opened 1 week ago

m6121 commented 1 week ago

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

m6121 commented 1 week ago

Hi @jochenklar and @MyPyDavid, what do you think about automatically adding views to projects on either user change of the catalog or change of the view <-> catalog relation within the management interface?

coveralls commented 1 week ago

Coverage Status

coverage: 90.476% (-0.002%) from 90.478% when pulling 4c83585f751704522d50a10c45ca0434423fe51a on fix/1198-views-catalogs-change into 1eadee51947399601d85e476b261391826e0f95a on main.

MyPyDavid commented 1 day ago

we still need to think and discuss about this

jochenklar commented 1 day ago

I wrote something in https://github.com/rdmorganiser/rdmo/issues/1198. (I needed to look it up, we already have a feature flag, is used in rdmo/projects/apps.py)