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

Fix identhendelser som feiler på dobbel lagring av aktør #4805

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

fredrikpf
Copy link
Contributor

@fredrikpf fredrikpf commented Oct 4, 2024

💰 Hva skal gjøres, og hvorfor?

Favro
Vi har en del identhendelsetasker som feiler fordi vi lagrer ned aktør dobbelt. Går derfra vekk fra å lagre ned aktør to ganger i PersonidentService.
Bruker hentFagsakerPåPerson() i stedet for hentFagsakDeltager() siden sistnevnte gjør veldig mye mer enn å bare hente fagsakene som er gjeldende for personen.

@fredrikpf fredrikpf marked this pull request as ready for review October 4, 2024 13:32
@fredrikpf fredrikpf requested a review from a team as a code owner October 4, 2024 13:32
@fredrikpf fredrikpf changed the title Bug/håndter ny ident bugs Fix identhendelser som feiler på dobbel lagring av aktør Oct 7, 2024
Copy link
Contributor

@UyQuangNguyen UyQuangNguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! ⭐

@@ -147,7 +147,6 @@ class PersonidentService(
it.aktiv = false
it.gjelderTil = LocalDateTime.now()
}
if (lagreNyAktør) aktørIdRepository.saveAndFlush(aktør) // Må lagre her fordi unik index er en blanding av aktørid og gjelderTil, og hvis man ikke lagerer før man legger til ny, så feiler det pga indexen.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Artig at man ikke trengte denne alikevel :D

@fredrikpf fredrikpf added this pull request to the merge queue Oct 7, 2024
Merged via the queue into main with commit 318e8e7 Oct 7, 2024
5 checks passed
@fredrikpf fredrikpf deleted the bug/håndterNyIdentBugs branch October 7, 2024 07:56
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.

2 participants