Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: drop apis_vocabularies.models.LabelType #500

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading