Skip to content

Commit

Permalink
Allow the case contributors to download the result of an experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
U039b committed Sep 9, 2024
1 parent 3423914 commit 463a6b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion colander/core/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,10 @@ def perform_create(self, serializer):

@action(methods=['get'], detail=True)
def analysis(self, request, pk):
_analysis = None
cases = self.request.user.all_my_cases
try:
experiment = PiRogueExperiment.objects.get(pk=pk, owner=request.user)
experiment = PiRogueExperiment.objects.get(pk=pk, case__in=cases)
_analysis = experiment.analysis
except Artifact.DoesNotExist:
raise Http404
Expand Down

0 comments on commit 463a6b5

Please sign in to comment.