Skip to content

Fetch multiple items by UID#83

Merged
xispa merged 9 commits into2.xfrom
uid-batch-fetch
Mar 13, 2026
Merged

Fetch multiple items by UID#83
xispa merged 9 commits into2.xfrom
uid-batch-fetch

Conversation

@ramonski
Copy link
Copy Markdown
Contributor

Description of the issue/feature this PR addresses

This PR allows to fetch multiple items in one request by their UIDs

Current behavior before PR

GET /analysis/uid1?complete=1
GET /analysis/uid2?complete=1
GET /analysis/uid3?complete=1

Desired behavior after PR is merged

GET /analysis?uids=uid1,uid2,uid3&complete=1

--
I confirm I have tested the PR thoroughly and coded it according to PEP8
standards.

@ramonski ramonski requested a review from xispa March 12, 2026 22:37
ramonski and others added 8 commits March 12, 2026 23:59
Methods defined inside doctests have __globals__ pointing to the
doctest globs dict. When called from within a Zope request handler,
Python builtins are not resolved, causing NameError for True/False.

Explicitly bind True and False into the doctest namespace before the
adapter class definitions so they are found as globals at call time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The doctest framework clears the globs dict after users.rst finishes,
but DummyUserInfoAdapter stays registered in the global site manager.
When auth.rst runs next and triggers a login, to_dict.__globals__
points to the cleared dict where True is no longer defined.

Use (1 == 1) instead, which evaluates without a name lookup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The buildout.base.cfg has auto-checkout=* which caused mr.developer
to checkout senaite.jsonapi from branch=2.x to src/senaite.jsonapi/,
overriding the current branch checkout in '.'.

Override auto-checkout to list all packages except senaite.jsonapi
so that 'develop = .' uses the current branch's code for tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@xispa xispa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks!

@xispa xispa merged commit 4496cfa into 2.x Mar 13, 2026
2 checks passed
@xispa xispa deleted the uid-batch-fetch branch March 13, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants