normandy icon indicating copy to clipboard operation
normandy copied to clipboard

preferenceComparison filter object does not validate it's inputs: KeyError: 'pref'

Open mythmon opened this issue 5 years ago • 0 comments

https://sentry.prod.mozaws.net/operations/normandy-prod/issues/9938952/?referrer=github_plugin

STR:

Make a type=preferenceComparison filter object where instead of pref=foo.bar, you provide preference=foo.bar.

KeyError: 'pref'
(15 additional frame(s) were not displayed)
...
  File "rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "rest_framework/mixins.py", line 56, in retrieve
    return Response(serializer.data)
  File "rest_framework/serializers.py", line 548, in data
    ret = super().data
  File "rest_framework/serializers.py", line 246, in data
    self._data = self.to_representation(self.instance)

KeyError: 'pref'

mythmon avatar Nov 03 '20 17:11 mythmon