Blank parameters are not passed into next field in results · Issue #4393 · encode/django-rest-framework (original) (raw)

Checklist

Steps to reproduce

Visit a paginated API using blank URL parameter. For example: http://example.com/api/foo/?bar

Expected behavior

The next link in the results meta data should preserve the blank parameter. Example:

{
    "next": "http://example.com/api/foo/?bar&page=2",
   ...
}

Actual behavior

The next link in the results meta data swallows the blank parameter. Example:

{
    "next": "http://example.com/api/foo/?page=2",
   ...
}

I have an open pull request with a tests for this case.