|
@@ -90,8 +90,9 @@ def execute(request):
|
|
|
finally:
|
|
finally:
|
|
|
if notebook['type'].startswith('query-'):
|
|
if notebook['type'].startswith('query-'):
|
|
|
_snippet = [s for s in notebook['snippets'] if s['id'] == snippet['id']][0]
|
|
_snippet = [s for s in notebook['snippets'] if s['id'] == snippet['id']][0]
|
|
|
- _snippet['result']['handle'] = response['handle']
|
|
|
|
|
- _snippet['result']['statements_count'] = response['handle']['statements_count']
|
|
|
|
|
|
|
+ if 'handle' in response: # No failure
|
|
|
|
|
+ _snippet['result']['handle'] = response['handle']
|
|
|
|
|
+ _snippet['result']['statements_count'] = response['handle']['statements_count']
|
|
|
history = _historify(notebook, request.user)
|
|
history = _historify(notebook, request.user)
|
|
|
response['history_id'] = history.id
|
|
response['history_id'] = history.id
|
|
|
|
|
|