This model stores information about the requirement status of a `MetadataModelField` with respect to a parent object. e.g: if the `MetadataModelField` is attached to an `Environment` model, the parent object can be an instance of `Project` or `Organization`.
| 98 | |
| 99 | |
| 100 | class MetadataModelFieldRequirement(AbstractBaseExportableModel): |
| 101 | """This model stores information about the requirement status of a `MetadataModelField` with respect to |
| 102 | a parent object. e.g: if the `MetadataModelField` is attached to an `Environment` model, |
| 103 | the parent object can be an instance of `Project` or `Organization`. |
| 104 | """ |
| 105 | |
| 106 | content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE) |
| 107 | object_id = GenericObjectID() |
| 108 | content_object = GenericForeignKey("content_type", "object_id") |
| 109 | model_field = models.ForeignKey( |
| 110 | MetadataModelField, on_delete=models.CASCADE, related_name="is_required_for" |
| 111 | ) |
| 112 | |
| 113 | class Meta: |
| 114 | unique_together = ("content_type", "object_id", "model_field") |
| 115 | |
| 116 | |
| 117 | class Metadata(AbstractBaseExportableModel): |
nothing calls this directly
no test coverage detected
searching dependent graphs…