From 9df53042a10244ef81ff8873fa20f65da69c234a Mon Sep 17 00:00:00 2001 From: Jillian Vogel Date: Mon, 8 Jan 2024 01:45:28 +1030 Subject: [PATCH] fix: removes ObjectTagsByTaxonomySerializer.editable frontend will use userPermissions instead --- openedx_tagging/core/tagging/rest_api/v1/serializers.py | 1 - tests/openedx_tagging/core/tagging/test_views.py | 3 --- 2 files changed, 4 deletions(-) diff --git a/openedx_tagging/core/tagging/rest_api/v1/serializers.py b/openedx_tagging/core/tagging/rest_api/v1/serializers.py index d35df865..e4aa0d0b 100644 --- a/openedx_tagging/core/tagging/rest_api/v1/serializers.py +++ b/openedx_tagging/core/tagging/rest_api/v1/serializers.py @@ -194,7 +194,6 @@ def to_representation(self, instance: list[ObjectTag]) -> dict: tax_entry = { "name": obj_tag.name, "taxonomy_id": obj_tag.taxonomy_id, - "editable": (not obj_tag.taxonomy.cast().system_defined) if obj_tag.taxonomy else False, "tags": [] } taxonomies.append(tax_entry) diff --git a/tests/openedx_tagging/core/tagging/test_views.py b/tests/openedx_tagging/core/tagging/test_views.py index a79c7746..a19be95b 100644 --- a/tests/openedx_tagging/core/tagging/test_views.py +++ b/tests/openedx_tagging/core/tagging/test_views.py @@ -690,7 +690,6 @@ def test_retrieve_object_tags(self, user_attr, expected_status): { "name": "Life on Earth", "taxonomy_id": 1, - "editable": True, "tags": [ # Note: based on tree order (Animalia before Fungi), this tag comes first even though it # starts with "M" and Fungi starts with "F" @@ -719,7 +718,6 @@ def test_retrieve_object_tags(self, user_attr, expected_status): { "name": "User Authors", "taxonomy_id": 3, - "editable": False, "tags": [ { "value": "test_user_1", @@ -874,7 +872,6 @@ def test_retrieve_object_tags_taxonomy_queryparam( { "name": "User Authors", "taxonomy_id": 3, - "editable": False, "tags": [ { "value": "test_user_1",