Skip to content

Commit

Permalink
Rename CIVSetContainerMixin
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvanrun committed May 24, 2024
1 parent 2b011fa commit 90ba723
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions app/grandchallenge/archives/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from grandchallenge.anatomy.models import BodyStructure
from grandchallenge.components.models import (
CIVForObjectMixin,
CIVSetContainerMixin,
CIVSetStringRepresentationMixin,
ComponentInterfaceValue,
ValuesForInterfacesMixin,
)
Expand Down Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion app/grandchallenge/components/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

Expand Down
6 changes: 4 additions & 2 deletions app/grandchallenge/reader_studies/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from grandchallenge.anatomy.models import BodyStructure
from grandchallenge.components.models import (
CIVForObjectMixin,
CIVSetContainerMixin,
CIVSetStringRepresentationMixin,
ComponentInterface,
ComponentInterfaceValue,
InterfaceKind,
Expand Down Expand Up @@ -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
)
Expand Down

0 comments on commit 90ba723

Please sign in to comment.