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

simplify and fix neuronjson fields processing #401

Merged
merged 2 commits into from
Feb 11, 2025
Merged

simplify and fix neuronjson fields processing #401

merged 2 commits into from
Feb 11, 2025

Conversation

DocSavage
Copy link
Member

@DocSavage DocSavage commented Feb 11, 2025

This addresses an issue noticed by @stuarteberg regarding incorrect behavior for the neuronjson datatype's /all endpoint when only selecting fields with _user and show=user query string:

http://dvid-server/api/node/:master/segmentation_annotations/all?show=user&fields=type_user
http://dvid-server/api/node/:master/segmentation_annotations/all?show=user&fields=type_user,type

The first will only return a fraction of the second request. This error was caused by a bug in overly complicated code to handle the various options for returning neuronjson data. It was fixed by moving from a procedure that removed fields to one that added fields from stored data as needed.

With the added tests I was able to verify the bad behavior between the two types of requests.


This change is Reviewable

@DocSavage DocSavage requested review from stuarteberg and removed request for stuarteberg February 11, 2025 03:43
@DocSavage DocSavage merged commit c2a47ed into master Feb 11, 2025
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

Successfully merging this pull request may close these issues.

1 participant