Actions
Task #3025
closednatural key fields are defined in two places
Start date:
Due date:
% Done:
0%
Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 26
Quarter:
Description
All models inheriting from Content define a 'unique together' set of fields. Content model also has a natural_key_fields tuple. As a result we have uniqueness defined in two place. To keep things DRY we should only define the uniqueness as part of the class Meta. Example of how this can work is already implemented in pulp_example[0].
[0] https://github.com/dkliban/pulp_example/blob/master/pulp_example/app/models.py#L89
Actions
Removing natural key fields attribute
refs #3025 https://pulp.plan.io/issues/3025