From 6480da3ba62eba33051e1f6cf4114eceab9faf7a Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Fri, 29 Sep 2023 11:57:24 -0700 Subject: [PATCH] chore: get all tests passing --- openedx_tagging/core/tagging/rest_api/v1/views.py | 2 ++ tests/openedx_tagging/core/tagging/test_views.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/openedx_tagging/core/tagging/rest_api/v1/views.py b/openedx_tagging/core/tagging/rest_api/v1/views.py index 91208a0f..9dbb2cc0 100644 --- a/openedx_tagging/core/tagging/rest_api/v1/views.py +++ b/openedx_tagging/core/tagging/rest_api/v1/views.py @@ -318,6 +318,8 @@ def update(self, request, object_id, partial=False): tags = body.data.get("tags", []) try: tag_object(taxonomy, tags, object_id) + except Tag.DoesNotExist as e: + raise ValidationError(e) except ValueError as e: raise ValidationError(e) diff --git a/tests/openedx_tagging/core/tagging/test_views.py b/tests/openedx_tagging/core/tagging/test_views.py index b7b12cd3..effd6460 100644 --- a/tests/openedx_tagging/core/tagging/test_views.py +++ b/tests/openedx_tagging/core/tagging/test_views.py @@ -533,7 +533,7 @@ def test_retrieve_object_tags_taxonomy_queryparam( if status.is_success(expected_status): assert len(response.data) == expected_count for object_tag in response.data: - assert object_tag.get("is_valid") is True + assert object_tag.get("is_deleted") is False assert object_tag.get("taxonomy_id") == self.enabled_taxonomy.pk @ddt.data(