Skip to content

Commit

Permalink
fix: removes ObjectTagsByTaxonomySerializer.editable
Browse files Browse the repository at this point in the history
frontend will use userPermissions instead
  • Loading branch information
pomegranited committed Jan 7, 2024
1 parent 231036f commit 9df5304
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion openedx_tagging/core/tagging/rest_api/v1/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions tests/openedx_tagging/core/tagging/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -874,7 +872,6 @@ def test_retrieve_object_tags_taxonomy_queryparam(
{
"name": "User Authors",
"taxonomy_id": 3,
"editable": False,
"tags": [
{
"value": "test_user_1",
Expand Down

0 comments on commit 9df5304

Please sign in to comment.