fix filter

This commit is contained in:
Administrator 2023-09-26 00:47:47 +03:00
parent c4b65ff11f
commit 7ee6f775bf
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ def get_config(request):
name = request.GET.get('name')
if project is None or stage is None or name is None:
return HttpResponse('', status=400)
config = Config.objects.filter(stage=stage, project=project, name=name).first()
config = Config.objects.filter(stage=stage, project__name=project, name=name).first()
if config is None:
return HttpResponse('', status=404)
return JsonResponse(config.data)

View File

@ -53,7 +53,7 @@ def get_experiment(request):
name = request.GET.get('name')
if project is None or stage is None or name is None:
return HttpResponse('', status=400)
experiment = Experiment.objects.filter(stage=stage, project=project, name=name).first()
experiment = Experiment.objects.filter(stage=stage, project__name=project, name=name).first()
if experiment is None:
return HttpResponse('', status=404)
return JsonResponse({