Fix Analyses field ignoring a plain list of analysis service UIDs - #104
Open
ramonski wants to merge 1 commit into
Open
Fix Analyses field ignoring a plain list of analysis service UIDs#104ramonski wants to merge 1 commit into
ramonski wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ARAnalysesFieldManager.setaccepts either a single UID, a list of{"uid": ...}dicts, or a list of UID strings. The UID-string branch was guarded byif api.is_uid(value), which tests the wholevalue(a list) instead of the currentitem. 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 asAnalyses 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/createon 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.