SciCatProject/backend-v3

principalInvestigator should not be in rawDataset model

Closed this issue · 2 comments

Currently, the rawDataset model contains a "principalInvestigator" field. Since this should be identical to the PI in the linked proposalId, it should perhaps be left out of the dataset to avoid having duplicate keys with conflicting information.

Note that proposals can (should?) even be generated for commissioning measurements, so that the principalInvestigator is always defined.

cc. @ibressler

You raise a valid point. The reason for the current solution is, that we need to cover cases of Datasets which are not linked to any proposal. Making a fake proposal also for this case was considered overkill. Please keep in mind that the principalInvestigator field is not a key in the RDB sense, just a string.

However you are right this leaves the problem that the information in the dataset and in the proposal may be conflicting. In this case we decided to go with the information in the proposal (if it exists), so the rule is that the proposal information about the PI takes precedence.

So in summary we plan to leave the situation as is and deal with potential conflicts in the way described above

Alright, thanks for the clarification!