diff --git a/app/grandchallenge/archives/models.py b/app/grandchallenge/archives/models.py index f5cbc38cd8..3eacede8f3 100644 --- a/app/grandchallenge/archives/models.py +++ b/app/grandchallenge/archives/models.py @@ -13,7 +13,7 @@ from grandchallenge.anatomy.models import BodyStructure from grandchallenge.components.models import ( CIVForObjectMixin, - CIVSetContainerMixin, + CIVSetStringRepresentationMixin, ComponentInterfaceValue, ValuesForInterfacesMixin, ) @@ -286,7 +286,9 @@ class ArchiveGroupObjectPermission(GroupObjectPermissionBase): content_object = models.ForeignKey(Archive, on_delete=models.CASCADE) -class ArchiveItem(CIVSetContainerMixin, CIVForObjectMixin, UUIDModel): +class ArchiveItem( + CIVSetStringRepresentationMixin, CIVForObjectMixin, UUIDModel +): archive = models.ForeignKey( Archive, related_name="items", on_delete=models.PROTECT ) diff --git a/app/grandchallenge/components/models.py b/app/grandchallenge/components/models.py index 38167a1620..633e88c57e 100644 --- a/app/grandchallenge/components/models.py +++ b/app/grandchallenge/components/models.py @@ -1962,7 +1962,7 @@ def update_size_in_storage(self): self.size_in_registry = self.calculate_size_in_registry() -class CIVSetContainerMixin: +class CIVSetStringRepresentationMixin: def __str__(self): result = [str(self.pk)] diff --git a/app/grandchallenge/reader_studies/models.py b/app/grandchallenge/reader_studies/models.py index 07122f49d7..d9de2378fc 100644 --- a/app/grandchallenge/reader_studies/models.py +++ b/app/grandchallenge/reader_studies/models.py @@ -26,7 +26,7 @@ from grandchallenge.anatomy.models import BodyStructure from grandchallenge.components.models import ( CIVForObjectMixin, - CIVSetContainerMixin, + CIVSetStringRepresentationMixin, ComponentInterface, ComponentInterfaceValue, InterfaceKind, @@ -791,7 +791,9 @@ def delete_reader_study_groups_hook(*_, instance: ReaderStudy, using, **__): pass -class DisplaySet(CIVSetContainerMixin, CIVForObjectMixin, UUIDModel): +class DisplaySet( + CIVSetStringRepresentationMixin, CIVForObjectMixin, UUIDModel +): reader_study = models.ForeignKey( ReaderStudy, related_name="display_sets", on_delete=models.PROTECT )