Raises IsADirectoryError if web_funcionarios.cargo.en_funcion_activa.funcionario.foto is None.
>>> WebFuncionarios.objects.all()[0].cargo.en_funcion_activa.funcionario.foto
<VersatileImageFieldFile: None>
>>>
[28/Jul/2016 14:39:25] "GET /funcionarios/organigrama HTTP/1.1" 500 266295
Internal Server Error: /funcionarios/organigrama
Traceback (most recent call last):
File "/home/ignacio/py3/lib/python3.5/site-packages/django/core/handlers/base.py", line 149, in get_response
response = self.process_exception_by_middleware(e, request)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/core/handlers/base.py", line 147, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/utils/decorators.py", line 149, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/home/ignacio/proyectos/Qhapax/website/views_funcionarios.py", line 33, in home
return render(request, url, context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/shortcuts.py", line 67, in render
template_name, context, request=request, using=using)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/loader.py", line 97, in render_to_string
return template.render(context, request)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/backends/django.py", line 95, in render
return self.template.render(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 206, in render
return self._render(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 197, in _render
return self.nodelist.render(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 992, in render
bit = node.render_annotated(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 959, in render_annotated
return self.render(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/loader_tags.py", line 173, in render
return compiled_parent._render(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 197, in _render
return self.nodelist.render(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 992, in render
bit = node.render_annotated(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 959, in render_annotated
return self.render(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/loader_tags.py", line 69, in render
result = block.nodelist.render(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 992, in render
bit = node.render_annotated(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 959, in render_annotated
return self.render(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/defaulttags.py", line 220, in render
nodelist.append(node.render_annotated(context))
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 959, in render_annotated
return self.render(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/defaulttags.py", line 326, in render
return nodelist.render(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 992, in render
bit = node.render_annotated(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 959, in render_annotated
return self.render(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/defaulttags.py", line 326, in render
return nodelist.render(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 992, in render
bit = node.render_annotated(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 959, in render_annotated
return self.render(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 1043, in render
output = self.filter_expression.resolve(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 709, in resolve
obj = self.var.resolve(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 850, in resolve
value = self._resolve_lookup(context)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/template/base.py", line 883, in _resolve_lookup
current = current[bit]
File "/home/ignacio/py3/lib/python3.5/site-packages/versatileimagefield/datastructures/sizedimage.py", line 120, in __getitem__
height=height
File "/home/ignacio/py3/lib/python3.5/site-packages/versatileimagefield/datastructures/sizedimage.py", line 168, in create_resized_image
path_to_image
File "/home/ignacio/py3/lib/python3.5/site-packages/versatileimagefield/datastructures/base.py", line 140, in retrieve_image
image = self.storage.open(path_to_image, 'rb')
File "/home/ignacio/py3/lib/python3.5/site-packages/django/core/files/storage.py", line 37, in open
return self._open(name, mode)
File "/home/ignacio/py3/lib/python3.5/site-packages/django/core/files/storage.py", line 201, in _open
return File(open(self.path(name), mode))
IsADirectoryError: [Errno 21] Is a directory: '/home/ignacio/proyectos/Qhapax/media'