Skip to content

fix UserForm saving...OP-1611#113

Open
Blue-B-code wants to merge 1 commit intoopenimis:developfrom
Y-Note-SAS:feature/OP-1611
Open

fix UserForm saving...OP-1611#113
Blue-B-code wants to merge 1 commit intoopenimis:developfrom
Y-Note-SAS:feature/OP-1611

Conversation

@Blue-B-code
Copy link

Initially, an Admin user was assigned a health facility. We removed it and saved the changes. The success message appears on the sidebar, but when refreshing the page or returning to it, the health facility is still there.

This happens because the mapQueriesUserToStore function forces user.healthFacilities to take the value of the old user.claimAdmin.healthFacilities when user.healthFacilities is null.

We prevented this to fix the issue.

@delcroip
Copy link
Member

the full init from claim admin seems wrong, this should be manage by a migration and fully removed

I believe it was there for when legacy was running in // with modular

@ajinkyagadewar
Copy link

@delcroip Good point. @Blue-B-code The initialization from claimAdmin was originally introduced to support the legacy + modular system running in parallel. Since we are no longer relying on the legacy model, it would be cleaner to migrate the remaining data and remove this fallback logic entirely instead of maintaining it in mapQueriesUserToStore.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants