Skip to content

Fix Analyses field ignoring a plain list of analysis service UIDs - #104

Open
ramonski wants to merge 1 commit into
feature/allow-setup-config-updatefrom
feature/fix-ar-analyses-uid-list
Open

Fix Analyses field ignoring a plain list of analysis service UIDs#104
ramonski wants to merge 1 commit into
feature/allow-setup-config-updatefrom
feature/fix-ar-analyses-uid-list

Conversation

@ramonski

Copy link
Copy Markdown
Contributor

Description

ARAnalysesFieldManager.set accepts either a single UID, a list of {"uid": ...} dicts, or a list of UID strings. The UID-string branch was guarded by if api.is_uid(value), which tests the whole value (a list) instead of the current item. A list is never a UID, so every plain UID string fell through, no UIDs were collected, and the Analyses field was set to empty -- surfacing as Analyses erfordert eine Eingabe / Invalid value for field Analyses.

The fix checks item (and makes the two branches mutually exclusive). A list of analysis service UID strings now sets the analyses as expected; the dict form keeps working.

Current behavior before PR

update/create on an AnalysisRequest with {"Analyses": ["<uid>", "<uid>"]} fails with a required-field error, because the field manager silently discards every UID.

Desired behavior after PR is merged

Both forms work: a plain list of UID strings (["<uid>", ...]) and a list of dicts ([{"uid": "<uid>"}, ...]).

Stacked on #103.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug 🐞 Something is broken

Development

Successfully merging this pull request may close these issues.

1 participant