mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-01-27 17:54:11 +03:00
Fix UnboundLocalError occurrences
This commit is contained in:
parent
0a18558bf6
commit
6bd89f2c78
|
@ -111,6 +111,7 @@ class GraphQLView(View):
|
|||
result, status_code = self.get_response(request, data, show_graphiql)
|
||||
|
||||
if show_graphiql:
|
||||
query, variables, operation_name, id = self.get_graphql_params(request, data)
|
||||
return self.render_graphiql(
|
||||
request,
|
||||
graphiql_version=self.graphiql_version,
|
||||
|
@ -146,6 +147,7 @@ class GraphQLView(View):
|
|||
show_graphiql
|
||||
)
|
||||
|
||||
status_code = 200
|
||||
if execution_result:
|
||||
response = {}
|
||||
|
||||
|
@ -155,7 +157,6 @@ class GraphQLView(View):
|
|||
if execution_result.invalid:
|
||||
status_code = 400
|
||||
else:
|
||||
status_code = 200
|
||||
response['data'] = execution_result.data
|
||||
|
||||
if self.batch:
|
||||
|
|
Loading…
Reference in New Issue
Block a user