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

Simplify Tag Models [FC-0030] #87

Merged
merged 13 commits into from
Oct 3, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore: get all tests passing
bradenmacdonald committed Sep 29, 2023
commit 6480da3ba62eba33051e1f6cf4114eceab9faf7a
2 changes: 2 additions & 0 deletions openedx_tagging/core/tagging/rest_api/v1/views.py
Original file line number Diff line number Diff line change
@@ -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)

2 changes: 1 addition & 1 deletion tests/openedx_tagging/core/tagging/test_views.py
Original file line number Diff line number Diff line change
@@ -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(