Skip to content

Commit

Permalink
fix: accept complex objectId e.g; dot(.) in objectId
Browse files Browse the repository at this point in the history
ObjectTagView and ObjectTagCountsView are updated to accept complex ObjectIds
  • Loading branch information
marslanabdulrauf committed Nov 21, 2024
1 parent 2d1b334 commit 2d7b0ff
Showing 1 changed file with 2 additions and 0 deletions.
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
Expand Up @@ -450,6 +450,7 @@ class ObjectTagView(
minimal_serializer_class = ObjectTagMinimalSerializer
permission_classes = [ObjectTagObjectPermissions]
lookup_field = "object_id"
lookup_value_regex = r'[\w\.\+\-@:]+'

def get_queryset(self) -> models.QuerySet:
"""
Expand Down Expand Up @@ -619,6 +620,7 @@ class ObjectTagCountsView(

serializer_class = ObjectTagSerializer
lookup_field = "object_id_pattern"
lookup_value_regex = r'[\w\.\+\-@:*,]+'

def retrieve(self, request, *args, **kwargs) -> Response:
"""
Expand Down

0 comments on commit 2d7b0ff

Please sign in to comment.