From b752b155f68241207eed29f6c79e9ba288dd7988 Mon Sep 17 00:00:00 2001 From: Birger Schacht Date: Fri, 15 Mar 2024 11:03:08 +0100 Subject: [PATCH] fix(apis_metainfo)!: drop RootObject.deprecated_name --- .../0012_remove_rootobject_deprecated_name.py | 17 +++++++++++++++++ apis_core/apis_metainfo/models.py | 1 - apis_core/apis_metainfo/test_models.py | 1 - apis_core/apis_relations/filtersets.py | 1 - 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 apis_core/apis_metainfo/migrations/0012_remove_rootobject_deprecated_name.py diff --git a/apis_core/apis_metainfo/migrations/0012_remove_rootobject_deprecated_name.py b/apis_core/apis_metainfo/migrations/0012_remove_rootobject_deprecated_name.py new file mode 100644 index 000000000..0961110ee --- /dev/null +++ b/apis_core/apis_metainfo/migrations/0012_remove_rootobject_deprecated_name.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.10 on 2024-03-15 10:02 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("apis_metainfo", "0011_alter_rootobject_deprecated_name"), + ] + + operations = [ + migrations.RemoveField( + model_name="rootobject", + name="deprecated_name", + ), + ] diff --git a/apis_core/apis_metainfo/models.py b/apis_core/apis_metainfo/models.py index a951d6bdc..39ed4d441 100644 --- a/apis_core/apis_metainfo/models.py +++ b/apis_core/apis_metainfo/models.py @@ -26,7 +26,6 @@ class RootObject(GenericModel, models.Model): By having one overarching super class we gain the advantage of unique identifiers. """ - deprecated_name = models.CharField(max_length=255, verbose_name="Name", blank=True) # self_contenttype: a foreign key to the respective contenttype comes in handy when querying for # triples where the subject's or object's contenttype must be respected (e.g. get all triples # where the subject is a Person) diff --git a/apis_core/apis_metainfo/test_models.py b/apis_core/apis_metainfo/test_models.py index 70104e2f4..54b7afc3e 100644 --- a/apis_core/apis_metainfo/test_models.py +++ b/apis_core/apis_metainfo/test_models.py @@ -8,7 +8,6 @@ class ModelTestCase(TestCase): def setUp(cls): # Set up data for the whole TestCase user_type = ContentType.objects.get(app_label="auth", model="user") - RootObject.objects.create(self_contenttype=user_type, deprecated_name="foo") RootObject.objects.create(self_contenttype=user_type) def test_uri(self): diff --git a/apis_core/apis_relations/filtersets.py b/apis_core/apis_relations/filtersets.py index 99822b088..6452fc82d 100644 --- a/apis_core/apis_relations/filtersets.py +++ b/apis_core/apis_relations/filtersets.py @@ -6,7 +6,6 @@ PROPERTY_EXCLUDES = [ "self_contenttype", - "deprecated_name", "property_class_uri", "rootobject_ptr", ]