Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
RISDEV-0000
  • Loading branch information
VictorDelCampo committed Mar 2, 2024
1 parent 5a472e9 commit 455aebc
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import de.bund.digitalservice.ris.norms.adapter.output.database.dto.AmendingLawDto;
import de.bund.digitalservice.ris.norms.domain.entity.AmendingLaw;
import java.util.Optional;

/** Mapper class for converting between {@link AmendingLawDto} and {@link AmendingLaw}. */
public class AmendingLawMapper {
Expand Down Expand Up @@ -64,7 +65,10 @@ public static AmendingLawDto mapToDto(final AmendingLaw amendingLaw) {
.printAnnouncementPage(amendingLaw.getPrintAnnouncementPage())
.digitalAnnouncementEdition(amendingLaw.getDigitalAnnouncementEdition())
.title(amendingLaw.getTitle())
.articleDtos(amendingLaw.getArticles().stream().map(ArticleMapper::mapToDto).toList())
.articleDtos(
Optional.ofNullable(amendingLaw.getArticles())
.map(articles -> articles.stream().map(ArticleMapper::mapToDto).toList())
.orElse(null))
.xml(amendingLaw.getXml())
.build();
}
Expand Down

0 comments on commit 455aebc

Please sign in to comment.