Skip to content

Commit

Permalink
copy(request) causes recursion error
Browse files Browse the repository at this point in the history
  • Loading branch information
sheppard committed Dec 9, 2014
1 parent 0e1de58 commit 8b1550f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions rest/app.py
Expand Up @@ -16,7 +16,6 @@
from .models import get_ct
from .permissions import has_perm
from .views import SimpleViewSet, ModelViewSet
from copy import copy

PREDICATES = ('annotated', 'identified', 'located', 'marked', 'related')

Expand Down Expand Up @@ -145,11 +144,11 @@ def paginate(self, model, page_num, request=None):
paginate_by = self.get_paginate_by_for_model(model)
viewset = self.get_viewset_for_model(model)
qs = self.get_queryset_for_model(model, request)
req = copy(request)
req.GET = {}
# FIXME: should copy() before modifying but doing so causes recursion
request.GET = {}
qs = viewset(
action="list",
request=req,
request=request,
kwargs={}
).filter_queryset(qs)

Expand Down

0 comments on commit 8b1550f

Please sign in to comment.