Index out of range error when adding payments with only one tier configured.

RESOLVED WONTFIX

Status

P5
normal
RESOLVED WONTFIX
6 years ago
4 years ago

People

(Reporter: scolville, Unassigned)

Tracking

x86
Mac OS X
Points:
---

Details

Saw this in local development environment which only had a single tier (tier 0 - $0.00) setup.

Adding a second tier via the admin tools works around it.

Traceback (most recent call last):
  File "/usr/lib/python2.6/wsgiref/handlers.py", line 93, in run
    self.result = application(self.environ, self.start_response)
  File "/home/tiffin/venv/zamboni/lib/python2.6/site-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__
    return self.application(environ, start_response)
  File "/home/tiffin/venv/zamboni/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 241, in __call__
    response = self.get_response(request)
  File "/home/tiffin/venv/zamboni/lib/python2.6/site-packages/django/core/handlers/base.py", line 179, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/home/tiffin/venv/zamboni/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/home/tiffin/code/zamboni/apps/amo/decorators.py", line 156, in wrapper
    return f(*args, **kw)
  File "/home/tiffin/code/zamboni/apps/amo/decorators.py", line 148, in wrapper
    return f(*args, **kw)
  File "/home/tiffin/code/zamboni/apps/addons/decorators.py", line 33, in wrapper
    return f(request, addon, *args, **kw)
  File "/home/tiffin/code/zamboni/apps/amo/decorators.py", line 31, in wrapper
    return func(request, *args, **kw)
  File "/home/tiffin/code/zamboni/mkt/developers/decorators.py", line 49, in wrapper
    return fun()
  File "/home/tiffin/code/zamboni/mkt/developers/decorators.py", line 28, in <lambda>
    *args, **kw)
  File "/home/tiffin/code/zamboni/mkt/developers/views_payments.py", line 66, in payments
    premium_form.save()
  File "/home/tiffin/code/zamboni/mkt/developers/forms_payments.py", line 194, in save
    premium = self._make_premium()
  File "/home/tiffin/code/zamboni/mkt/developers/forms_payments.py", line 100, in _make_premium
    return AddonPremium(addon=self.addon, price=self._initial_price())
  File "/home/tiffin/code/zamboni/mkt/developers/forms_payments.py", line 93, in _initial_price
    return Price.objects.active().exclude(price='0.00')[0]
  File "/home/tiffin/venv/zamboni/lib/python2.6/site-packages/django/db/models/query.py", line 207, in __getitem__
    return list(qs)[0]
IndexError: list index out of range
Priority: -- → P5

Comment 1

4 years ago
This code no longer exists.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.