Skip to content

Commit

Permalink
refactor!: drop apis_vocabularies.models.LabelType
Browse files Browse the repository at this point in the history
Given that we don't use the `Label` model anymore since
0c44287, we can safely remove
`LabelType`, too

Closes: #498
  • Loading branch information
b1rger committed Dec 18, 2023
1 parent 13088b6 commit d690d93
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
2 changes: 0 additions & 2 deletions apis_core/apis_entities/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ def merge_with(self, entities):

# TODO: check if these imports can be put to top of module without
# causing circular import issues.
from apis_core.apis_vocabularies.models import LabelType
from apis_core.apis_metainfo.models import Uri

e_a = type(self).__name__
Expand All @@ -206,7 +205,6 @@ def merge_with(self, entities):
e_b = type(ent).__name__
if e_a != e_b:
continue
lt, created = LabelType.objects.get_or_create(name="Legacy name (merge)")
# TODO: if collections are removed, remove this as well
if hasattr(ent, "collection"):
col_list = list(self.collection.all())
Expand Down
7 changes: 0 additions & 7 deletions apis_core/apis_vocabularies/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,6 @@ def __str__(self):
# """Holds controlled vocabularies about event-types"""
# pass

# TODO RDF: Remove this
@reversion.register(follow=["vocabsbaseclass_ptr"])
class LabelType(VocabsBaseClass):
"""Holds controlled vocabularies about label-types"""

pass


# TODO RDF: Remove this
@reversion.register(follow=["vocabsbaseclass_ptr"])
Expand Down
5 changes: 0 additions & 5 deletions apis_core/apis_vocabularies/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
CollectionType,
VocabsBaseClass,
VocabNames,
LabelType,
)


Expand Down Expand Up @@ -184,7 +183,3 @@ class Meta:
# model = WorkType
#
#
class LabelTypeSerializer(serializers.ModelSerializer):
class Meta:
fields = ("id", "name")
model = LabelType
1 change: 0 additions & 1 deletion apis_core/utils/test_caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
],
"apis_vocabularies": [
"CollectionType",
"LabelType",
"TextType",
"VocabNames",
"VocabsBaseClass",
Expand Down

0 comments on commit d690d93

Please sign in to comment.