If an album has no associated releases, attempting to view its artist's page will lead to an exception being raised

Bug #614635 reported by Chris Wagner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Resonate
Confirmed
Low
Unassigned

Bug Description

Here's an example stack trace...

Traceback (most recent call last):

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/actions/__init__.py", line 33, in execute_view
    return render_to_response(template, template_vars)

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/actions/__init__.py", line 77, in render_to_response
    return HttpResponseOkay(render_template(template, template_vars))

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/lib/templates.py", line 14, in render_template
    return _get_template_env().get_template(template_name).render(**data). \

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/templates/members/artist.tpl", line 1, in top-level template code
    {% extends "members/base.tpl" %}

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/templates/members/base.tpl", line 2, in top-level template code
    {% extends "base.tpl" %}

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/templates/base.tpl", line 2, in top-level template code
    {% extends "bare-base.tpl" %}

  File "/home/chrisw/app-data/easyweaze/ui/templates/bare-base.tpl", line 49, in top-level template code
    {% block body %}

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/templates/base.tpl", line 7, in block "body"
    {% block body_container %}

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/templates/members/base.tpl", line 91, in block "body_container"
    {% block content %}

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/templates/members/artist.tpl", line 23, in block "content"
    <a href="{{ members_prefix }}/releases/{{ a.releases[0].id }}"

  File "/home/chrisw/lib/python2.6/jinja2/environment.py", line 334, in getattr
    return getattr(obj, attribute)

  File "/home/chrisw/lib/python2.6/jinja2/runtime.py", line 403, in _fail_with_undefined_error
    raise self._undefined_exception(hint)

UndefinedError: 'InstrumentedList' object has no element 0

Changed in resonate:
importance: Undecided → Low
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.