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

pk=[] returns all articles #4

Open
martijnbastiaan opened this issue Mar 7, 2015 · 1 comment
Open

pk=[] returns all articles #4

martijnbastiaan opened this issue Mar 7, 2015 · 1 comment

Comments

@martijnbastiaan
Copy link
Member

When using list_articles() one would expect the following code to run without any errors:

api = AmcatAPI(**auth)
articles = api.list_articles(project=pn, articleset=an, pk=[])
self.assertEqual(0, len(list(articles)))

However, leaving pk 'empty' results in filtering on no pk at all. This is unexpected behaviour.

@vanatteveldt How should we fix this, if at all?

@vanatteveldt
Copy link
Member

Easy fix is in amcatclient to remove non-True filters. If the behaviour is caused by rest_framework I don't think we need to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants