Details
Description
When parent_directory of a document in JSON is null
import document fails with the following error
Traceback:
File "/opt/cloudera/parcels/CDH-5.10.1-1.cdh5.10.1.p0.10/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/core/handlers/base.py" in get_response
112. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/cloudera/parcels/CDH-5.10.1-1.cdh5.10.1.p0.10/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/transaction.py" in inner
371. return func(*args, **kwargs)
File "/opt/cloudera/parcels/CDH-5.10.1-1.cdh5.10.1.p0.10/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/utils/decorators.py" in _wrapped_view
99. response = view_func(request, *args, **kwargs)
File "/opt/cloudera/parcels/CDH-5.10.1-1.cdh5.10.1.p0.10/lib/hue/desktop/core/src/desktop/api2.py" in import_documents
470. doc = _copy_document_with_owner(doc, request.user, uuids_map)
File "/opt/cloudera/parcels/CDH-5.10.1-1.cdh5.10.1.p0.10/lib/hue/desktop/core/src/desktop/api2.py" in _copy_document_with_owner
627. parent_uuid = doc['fields']['parent_directory'][0]
Exception Type: TypeError at /desktop/api2/doc/import
Exception Value: 'NoneType' object is unsubscriptable
Request information:
GET: No GET data