Matthew Schinckel committed 512d79c

Revert the change: some old code still relies on getting a list as the content of the object get.

  • Participants
  • Parent commits c671586

Comments (0)

Files changed (1)


         return self.queryset(request)
     def read(self, request, pk):
-        obj = self.queryset(request).get(pk=pk)
-        if self.has_view_permission(request, obj):
-            return obj
+        qs = self.queryset(request).filter(pk=pk)
+        if self.has_view_permission(request, qs.get()):
+            return qs
         raise http.Forbidden()
     def create(self, request):