Skip to content

Refactor: merge AttributeSet into Subject

Bengfort requested to merge refactor-subject-attributes into master

The AttributeSet model only contains a single field (at least it did until !1054 (merged)) and has a one-to-one relation to Subject. It seems obvious that the two models could be merged. So I tried that.

My conclusion is that this is a lot of work for little benefit. There is no significant reduction in code or complexity.

An important aspect is that the AttributeSet model contains more than just the fields:

  • It has its own permissions
  • It has special code for the GDPR export view (related to #53 (closed))
  • It contains attribute related functionality: get_completeness() and get_statistics_bucket()

Merging all that into Subject would not really improve anything. So in the spirit of composition I would not merge this for now.

It might be an option to pick only 43bc016f though. It doesn't do much, but at least it gets rid of the prefix hack from !1135 (merged).

Merge request reports