validFrom not patchable anymore

This commit is contained in:
Michael Hoennig 2024-04-16 09:39:35 +02:00
parent b2059f407f
commit 38106cb9f6
2 changed files with 0 additions and 8 deletions

View File

@ -22,8 +22,6 @@ public class HsBookingItemEntityPatcher implements EntityPatcher<HsBookingItemPa
.ifPresent(entity::setCaption);
Optional.ofNullable(resource.getResources())
.ifPresent(r -> entity.getResources().patch(KeyValueMap.from(resource.getResources())));
OptionalFromJson.of(resource.getValidFrom())
.ifPresent(entity::setValidFrom);
OptionalFromJson.of(resource.getValidTo())
.ifPresent(entity::setValidTo);
}

View File

@ -34,7 +34,6 @@ class HsBookingItemEntityPatcherUnitTest extends PatchUnitTestBase<
private static final UUID INITIAL_BOOKING_ITEM_UUID = UUID.randomUUID();
private static final LocalDate GIVEN_VALID_FROM = LocalDate.parse("2020-04-15");
private static final LocalDate PATCHED_VALID_FROM = LocalDate.parse("2022-10-30");
private static final LocalDate PATCHED_VALID_TO = LocalDate.parse("2022-12-31");
private static final Map<String, Object> INITIAL_RESOURCES = patchMap(
@ -103,11 +102,6 @@ class HsBookingItemEntityPatcherUnitTest extends PatchUnitTestBase<
HsBookingItemEntity::putResources,
PATCHED_RESOURCES)
.notNullable(),
new JsonNullableProperty<>(
"validfrom",
HsBookingItemPatchResource::setValidFrom,
PATCHED_VALID_FROM,
HsBookingItemEntity::setValidFrom),
new JsonNullableProperty<>(
"validto",
HsBookingItemPatchResource::setValidTo,