Skip to content

fix: home page update su#282

Merged
QRuhier merged 1 commit into
feat/synchronize-improvementsfrom
fix/home-page-update-su
May 4, 2026
Merged

fix: home page update su#282
QRuhier merged 1 commit into
feat/synchronize-improvementsfrom
fix/home-page-update-su

Conversation

@QRuhier
Copy link
Copy Markdown
Collaborator

@QRuhier QRuhier commented Apr 30, 2026

On the home page, we check for every survey unit if it needs to be updated in IDB adding new state (the only current case is when we need to add the VIC state).

In the same time, when we persist in IDB, now we consider the survey unit as updated, in order to put it in the next synchronization.

But there was an issue, returning a copy of current states even if there is no new state to add.
Then, when comparing current states with the copy, it considered the lists were different, so even there we did persist surveyUnit with hasBeenUpdated:true

@QRuhier QRuhier changed the base branch from main to feat/synchronize-improvements April 30, 2026 09:38
@QRuhier
Copy link
Copy Markdown
Collaborator Author

QRuhier commented Apr 30, 2026

Would have been great to add tests on HomePage checking we persist only when needed, but i didn't have time for fighting with the mocks inside the hook 💀

But i improved tests globally to ensure it's ok

@sonarqubecloud
Copy link
Copy Markdown

@QRuhier QRuhier force-pushed the fix/home-page-update-su branch from a6f3b6f to 1f23839 Compare April 30, 2026 09:48
@QRuhier QRuhier requested a review from SimonDmz April 30, 2026 09:52
@QRuhier QRuhier merged commit 3b12fa7 into feat/synchronize-improvements May 4, 2026
4 checks passed
@QRuhier QRuhier deleted the fix/home-page-update-su branch May 4, 2026 07:20
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