Skip to content

Commit b80790c

Browse files
committed
Fix the legacy status endpoint
`RQId` wants an integer, but `pk` is a string.
1 parent c75b795 commit b80790c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cvat/apps/engine/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,10 +1515,10 @@ def append_annotations_chunk(self, request, pk, file_id):
15151515
)
15161516
@action(detail=True, methods=['GET'], serializer_class=RqStatusSerializer)
15171517
def status(self, request, pk):
1518-
self.get_object() # force call of check_object_permissions()
1518+
task = self.get_object() # force call of check_object_permissions()
15191519
response = self._get_rq_response(
15201520
queue=settings.CVAT_QUEUES.IMPORT_DATA.value,
1521-
job_id=RQId(RequestAction.CREATE, RequestTarget.TASK, pk).render()
1521+
job_id=RQId(RequestAction.CREATE, RequestTarget.TASK, task.id).render()
15221522
)
15231523
serializer = RqStatusSerializer(data=response)
15241524

0 commit comments

Comments
 (0)