Closed Bug 1225672 Opened 10 years ago Closed 10 years ago

[traceback] Extra field in ImageAttachmentSerializer

Categories

(support.mozilla.org :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mythmon, Assigned: mythmon)

Details

(Whiteboard: u=api p=1)

This seems like another fallout problem from the DRF 3 upgrade due to poor test coverage. The "good" news is this is the first I've seen this error, so at least this part of the API isn't used a lot. AssertionError: The field 'thumbnail_size' was declared on serializer ImageAttachmentSerializer, but has not been included in the 'fields' option. Stacktrace (most recent call last): File "django/core/handlers/base.py", line 111, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "newrelic/hooks/framework_django.py", line 497, in wrapper return wrapped(*args, **kwargs) File "kitsune/sumo/decorators.py", line 24, in _checkssl return view_func(request, *args, **kwargs) File "mobility/decorators.py", line 23, in wrapper return f(request, *args, **kw) File "session_csrf/__init__.py", line 127, in wrapper response = f(request, *args, **kw) File "kitsune/questions/views.py", line 501, in aaq return aaq_react(request) File "kitsune/sumo/decorators.py", line 24, in _checkssl return view_func(request, *args, **kwargs) File "session_csrf/__init__.py", line 127, in wrapper response = f(request, *args, **kw) File "kitsune/questions/views.py", line 485, in aaq_react ctx['images_json'] = to_json(images.data) File "rest_framework/serializers.py", line 674, in data ret = super(ListSerializer, self).data File "rest_framework/serializers.py", line 239, in data self._data = self.to_representation(self.instance) File "rest_framework/serializers.py", line 614, in to_representation self.child.to_representation(item) for item in iterable File "rest_framework/serializers.py", line 459, in to_representation fields = self._readable_fields File "django/utils/functional.py", line 55, in __get__ res = instance.__dict__[self.func.__name__] = self.func(instance) File "rest_framework/serializers.py", line 353, in _readable_fields field for field in self.fields.values() File "rest_framework/serializers.py", line 339, in fields for key, value in self.get_fields().items(): File "rest_framework/serializers.py", line 919, in get_fields field_names = self.get_field_names(declared_fields, info) File "rest_framework/serializers.py", line 1018, in get_field_names serializer_class=self.__class__.__name__
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.