Skip to content

Spike: foreign keys without pseudonyms

Bengfort requested to merge spike-foreign-keys-wo-pseudonyms into master

This is based on !491 (merged), but on top of adding foreign keys, I also removed the pseudonyms. So now the only model with a pseudonym is Contact. As a result, the resolve_pseudonym() helper is no longer useful. Instead, I added get_subject() and get_pseudonym().

AttributeSet.pseudonym was not used except for joining, so removing it was relatively simple.

ParticipationRequest.pseudonym on the other hand is used in the URL and is also displayed in the list. I have not yet found a solution for the list. (I think @goettel had some ideas about that though). I changed the URLs to use pk instead. I think from a privacy perspective this is fine. The only thing that a pk exposes is a rough idea of when this object was created. In the case of ParticipationRequest this is already given from the study. So there is only very little additional information.

Another thing I needed to adapt was the GDPR export view. It was very generic and used the list_pseudonyms() helper to gather all relevant data. I changed it to be less generic, which might actually be a good thing.

Merge request reports