[traceback] DoesNotExist: AppFeatures matching query does not exist. - django.db.models.query in get

VERIFIED FIXED in 2013-10-14

Status

Marketplace
API
P3
normal
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: cvan, Assigned: mat)

Tracking

2013-10-14
Points:
---

Details

(URL)

(Reporter)

Description

5 years ago
200 tracebacks: http://sentry.mktmon.services.phx1.mozilla.com/mkt/marketplacefirefoxcom/group/527/
978 tracebacks: http://sentry.mktmon.services.phx1.mozilla.com/mkt/marketplacefirefoxcom/group/470/

DoesNotExist: AppFeatures matching query does not exist.

Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "newrelic/api/object_wrapper.py", line 216, in __call__
    self._nr_instance, args, kwargs)
  File "newrelic/hooks/framework_django.py", line 475, in wrapper
    return wrapped(*args, **kwargs)
  File "rest_framework/viewsets.py", line 78, in view
    return self.dispatch(request, *args, **kwargs)
  File "django/views/decorators/csrf.py", line 77, in wrapped_view
    return view_func(*args, **kwargs)
  File "rest_framework/views.py", line 326, in dispatch
    response = self.handle_exception(exc)
  File "rest_framework/views.py", line 323, in dispatch
    response = handler(request, *args, **kwargs)
  File "rest_framework/mixins.py", line 106, in retrieve
    return Response(serializer.data)
  File "rest_framework/serializers.py", line 501, in data
    self._data = self.to_native(obj)
  File "mkt/versions/api.py", line 31, in to_native
    'features': AppFeaturesSerializer().to_native(obj.features),
  File "django/db/models/fields/related.py", line 255, in __get__
    rel_obj = self.get_query_set(instance=instance).get(**params)
  File "django/db/models/query.py", line 366, in get
    % self.model._meta.object_name)
(Reporter)

Comment 1

5 years ago
As Rob discovered, this is a version for a theme. We should be filtering by webapps.
(Assignee)

Comment 2

5 years ago
bug 913010 got rid of one of a similar issue happening sometimes in the reviewer tools, but this is more straightforward, we just should filter correctly in mkt/versions/api.py.
Assignee: nobody → mpillard
(Assignee)

Updated

5 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 3

5 years ago
Fixed in https://github.com/mozilla/zamboni/commit/195bed2ccf1c0b456fcb3e5e85deb394c92376d4

STR:
- Load the following URLs:
- https://marketplace-dev.allizom.org/api/v1/apps/versions/1490471/ should return a 404 error (it's a version for a theme)
- https://marketplace-dev.allizom.org/api/v1/apps/versions/1490543/ should return a 200 with some info about the version (it's a version for an app)
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2013-10-14
You need to log in before you can comment on or make changes to this bug.