From 7a8b1fa6390a38c2fd87d627d3b807d890521ab2 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Thu, 17 Dec 2020 18:03:35 +0100 Subject: [PATCH] [GraphQL] hide dossiers brouillon from api --- app/graphql/types/query_type.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/graphql/types/query_type.rb b/app/graphql/types/query_type.rb index 4ed32c7ab..34ba29f5b 100644 --- a/app/graphql/types/query_type.rb +++ b/app/graphql/types/query_type.rb @@ -19,7 +19,7 @@ module Types end def dossier(number:) - Dossier.for_api_v2.find(number) + Dossier.state_not_brouillon.for_api_v2.find(number) rescue => e raise GraphQL::ExecutionError.new(e.message, extensions: { code: :not_found }) end