[traceback] AttributeError: 'NoneType' object has no attribute 'get_price_locale' when submissions are sorted by Created

VERIFIED FIXED

Status

VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: cboldan.mozbugs, Unassigned)

Tracking

({regression})

x86_64
Windows 7
regression
Points:
---

Details

(Reporter)

Description

6 years ago
Steps to reproduce:
1. Load My Submissions page from Marketplace Dev Hub (or load https://marketplace-dev.allizom.org/en-US/developers/submissions )
2. Sort apps by "Created"

Expected results:
Apps are sorted by created date.

Actual results:
"Oops! We had an error." page is returned.

Notes/Issues:
Verified on FF16 (Win7). Issue is not reproducing in production.
Screencast for this issue http://screencast.com/t/XHkzyHTV
http://sentry.dmz.phx1.mozilla.com/marketplace-dev/group/1328/

AttributeError: 'NoneType' object has no attribute 'get_price_locale'

Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "amo/decorators.py", line 156, in wrapper
    return f(*args, **kw)

  File "amo/decorators.py", line 148, in wrapper
    return f(*args, **kw)

  File "mkt/developers/decorators.py", line 82, in wrapper
    return f(request, *args, webapp=True, **kwargs)

  File "amo/decorators.py", line 29, in wrapper
    return func(request, *args, **kw)

  File "mkt/developers/views.py", line 116, in dashboard
    return jingo.render(request, 'developers/apps/dashboard.html', data)

  File "jingo/__init__.py", line 80, in render
    rendered = render_to_string(request, template, context)

  File "jingo/__init__.py", line 98, in render_to_string
    return template.render(**get_context())

  File "jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)

  File "/data/www/addons-dev.allizom.org/zamboni/mkt/developers/templates/developers/apps/dashboard.html", line 3, in top-level template code
    {% set title = _('Manage My Submissions') %}

  File "/data/www/addons-dev.allizom.org/zamboni/mkt/developers/templates/developers/base_impala.html", line 8, in top-level template code
    {% set editable = "no-edit" if not check_addon_ownership(request, addon, dev=True) %}

  File "/data/www/addons-dev.allizom.org/zamboni/mkt/developers/templates/developers/skeleton_impala.html", line 96, in top-level template code
    {% block main_content %}

  File "/data/www/addons-dev.allizom.org/zamboni/mkt/developers/templates/developers/skeleton_impala.html", line 99, in block "main_content"
    {% block content %}{% endblock %}

  File "/data/www/addons-dev.allizom.org/zamboni/mkt/developers/templates/developers/apps/dashboard.html", line 29, in block "content"
    {{ hub_addon_listing_items(addons.object_list) }}

  File "jingo/__init__.py", line 148, in wrapper
    t = env.get_template(template).render(context)

  File "jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)

  File "/data/www/addons-dev.allizom.org/zamboni/mkt/developers/templates/developers/apps/listing/items.html", line 33, in top-level template code
    {{ price(addon) }}

  File "/data/www/addons-dev.allizom.org/zamboni/apps/addons/templates/addons/macros.html", line 53, in template
    {{ addon.premium.get_price_locale() }}

  File "market/models.py", line 197, in get_price_locale
    return self.price.get_price_locale()
Summary: "Oops" page displayed when submissions are sorted by Created → [traceback] AttributeError: 'NoneType' object has no attribute 'get_price_locale' when submissions are sorted by Created

Comment 2

6 years ago
Is it possible that there are simply enough apps in My Submissions that a problematic app is being hidden by pagination? There doesn't seem to be any inherent issues with the sorting itself.
(Reporter)

Comment 4

6 years ago
Verified as fixed in https://marketplace-dev.allizom.org/en-US/developers/submissions on FF16 (Win7)
Postfix screencast http://screencast.com/t/nRjp9VHTMW
Closing bug.
Status: RESOLVED → VERIFIED
QA Contact: developer-pages
You need to log in before you can comment on or make changes to this bug.