Skip to content

Commit 01b9b5f

Browse files
refactor: change object_id to context_id
Co-authored-by: Braden MacDonald <mail@bradenm.com>
1 parent c82e9cb commit 01b9b5f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

openedx/core/djangoapps/content_tagging/rest_api/v1/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
name="taxonomy-import-template",
2828
),
2929
path(
30-
"object_tags/<str:object_id>/export/",
30+
"object_tags/<str:context_id>/export/",
3131
views.ObjectTagExportView.as_view(),
3232
),
3333
path('', include(router.urls))

openedx/core/djangoapps/content_tagging/rest_api/v1/views.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ class ObjectTagOrgView(ObjectTagView):
150150

151151
class ObjectTagExportView(APIView):
152152
""""
153-
View to export a CSV with all children and tags for a given object_id.
153+
View to export a CSV with all children and tags for a given course/context.
154154
"""
155155
def get(self, request: Request, **kwargs) -> StreamingHttpResponse:
156156
"""
157-
Export a CSV with all children and tags for a given object_id.
157+
Export a CSV with all children and tags for a given course/context.
158158
"""
159159

160160
class Echo(object):
@@ -197,12 +197,12 @@ def _generate_csv_rows() -> Iterator[str]:
197197

198198
yield csv_writer.writerow(block_data)
199199

200-
object_id: str = kwargs.get('object_id', None)
200+
object_id: str = kwargs.get('context_id', None)
201201

202202
try:
203203
content_key = CourseKey.from_string(object_id)
204204
except InvalidKeyError as e:
205-
raise ValidationError("object_id is not a valid content key.") from e
205+
raise ValidationError("context_id is not a valid course key.") from e
206206

207207
# Check if the user has permission to view object tags for this object_id
208208
try:

0 commit comments

Comments
 (0)