Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit/offset via kwargs is broken #2

Closed
aaloy opened this issue Jan 24, 2014 · 3 comments
Closed

Limit/offset via kwargs is broken #2

aaloy opened this issue Jan 24, 2014 · 3 comments
Assignees
Labels

Comments

@aaloy
Copy link
Contributor

@aaloy aaloy commented Jan 24, 2014

I've tried with filter(limit=10) and other filters as is in the documentation, but always returns all the data, at some moment it looses the filter limit.

@maxtepkeev
Copy link
Owner

@maxtepkeev maxtepkeev commented Jan 24, 2014

Hi!

Thanks for the report.

You are right, limit/offset via keyword arguments is broken in current version. I will fix this ASAP.

Until this is fixed you can use offset/limit via slicing:

>>> time_entries = redmine.time_entry.filter(project_id='foobar')[:50]
>>> len(time_entries)
50

This behaviour is documented in the Operations section of the docs.

Let me know if this works for you. Thanks.

@ghost ghost assigned maxtepkeev Jan 24, 2014
@aaloy
Copy link
Contributor Author

@aaloy aaloy commented Jan 25, 2014

Yes the slicing works.

@maxtepkeev
Copy link
Owner

@maxtepkeev maxtepkeev commented Jan 26, 2014

Limit/offset via kwargs is fixed in 8c019f3.

@maxtepkeev maxtepkeev closed this Jan 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants