Skip to content

pk=[] returns all articles #4

@martijnbastiaan

Description

@martijnbastiaan

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions