MCPcopy
hub / github.com/WebODM/WebODM / get_and_check_task

Method get_and_check_task

app/api/tasks.py:460–470  ·  view source on GitHub ↗
(self, request, pk, annotate={})

Source from the content-addressed store, hash-verified

458 permission_classes = (AllowAny, )
459
460 def get_and_check_task(self, request, pk, annotate={}):
461 try:
462 task = self.queryset.annotate(**annotate).get(pk=pk)
463 except (ObjectDoesNotExist, ValidationError):
464 raise exceptions.NotFound()
465
466 # Check for permissions, unless the task is public
467 if not (task.public or task.project.public):
468 check_project_perms(request, task.project)
469
470 return task
471
472
473def download_file_response(request, filePath, content_disposition, download_filename=None):

Callers 15

postMethod · 0.80
postMethod · 0.80
getMethod · 0.80
getMethod · 0.80
postMethod · 0.80
postMethod · 0.80
postMethod · 0.80
getMethod · 0.80
postMethod · 0.80
postMethod · 0.80
postMethod · 0.80
postMethod · 0.80

Calls 2

check_project_permsFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected