[traceback] IndexError: list index out of range

VERIFIED FIXED in 6.2.0

Status

VERIFIED FIXED
7 years ago
3 years ago

People

(Reporter: krupa.mozbugs, Assigned: cvan)

Tracking

unspecified
6.2.0

Details

(URL)

(Reporter)

Description

7 years ago
steps to reproduce:
1. Add a 'Pick of the month' add-on at https://addons.allizom.org/z/en-US/admin/monthly-pick
2. Load https://addons.allizom.org/en-US/firefox/discovery/pane/5.0/Darwin

traceback details:
File "/data/amo_python/www/preview/zamboni/vendor/src/django/django/core/handlers/base.py", line 111, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/data/amo_python/www/preview/zamboni/apps/discovery/views.py", line 52, in pane
   'version': version, 'platform': platform})

 File "/data/amo_python/www/preview/zamboni/vendor/src/jingo/jingo/__init__.py", line 79, in render
   rendered = render_to_string(request, template, context)

 File "/data/amo_python/www/preview/zamboni/vendor/src/jingo/jingo/__init__.py", line 97, in render_to_string
   return template.render(**get_context())

 File "/usr/lib/python2.6/site-packages/jinja2/environment.py", line 891, in render
   return self.environment.handle_exception(exc_info, True)

 File "/data/amo_python/www/preview/zamboni/apps/discovery/templates/discovery/pane.html", line 4, in top-level template code
   {% set app = request.APP.pretty %}

 File "/data/amo_python/www/preview/zamboni/apps/discovery/templates/discovery/base.html", line 22, in top-level template code
   {% block content %}{% endblock %}

 File "/data/amo_python/www/preview/zamboni/apps/discovery/templates/discovery/pane.html", line 41, in block "content"
   {% for module in modules %}{{ module.render() }}{% endfor %}

 File "/data/amo_python/www/preview/zamboni/apps/discovery/modules.py", line 54, in render
   c = dict(self.context())

 File "/data/amo_python/www/preview/zamboni/apps/discovery/modules.py", line 76, in context
   pick = MP.objects.filter(locale__isnull=True)[0]

 File "/data/amo_python/www/preview/zamboni/vendor/src/django/django/db/models/query.py", line 190, in __getitem__
   return list(qs)[0]

IndexError: list index out of range

Updated

7 years ago
Assignee: nobody → cwiemeersch
(Reporter)

Updated

7 years ago
Blocks: 676307
(Assignee)

Comment 1

7 years ago
https://github.com/jbalogh/zamboni/commit/6824a9c
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Reporter)

Comment 2

7 years ago
verified fixed at https://addons.allizom.org/en-US/firefox/discovery/pane/5.0/Darwin
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.